diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-01-23 18:29:32 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-01-23 18:29:32 +0100 |
commit | 75d98b6013c19598b1d3ba5e05e8f84525e8678a (patch) | |
tree | 95089f2193c4097f26cddc0539f3a16e801fe0a5 /sysdep/unix | |
parent | ace3072e09e445b2fd8554492b80bea5cc1f3411 (diff) | |
parent | d6cf996151307d083c30e4ecde0f1d7449b19253 (diff) |
Merge branch 'master' into int-new
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 9 | ||||
-rw-r--r-- | sysdep/unix/krt.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index cd2558b2..012deaf0 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -958,10 +958,6 @@ sk_setup(sock *s) #endif } - if (s->priority >= 0) - if (sk_set_priority(s, s->priority) < 0) - return -1; - if (sk_is_ipv4(s)) { if (s->flags & SKF_LADDR_RX) @@ -1012,6 +1008,11 @@ sk_setup(sock *s) return -1; } + /* Must be after sk_set_tos4() as setting ToS on Linux also mangles priority */ + if (s->priority >= 0) + if (sk_set_priority(s, s->priority) < 0) + return -1; + return 0; } diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index bfdbfa4e..e7bd79e3 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -578,7 +578,7 @@ krt_export_net(struct krt_proto *p, net *net, rte **rt_free, ea_list **tmpa) if (filter == FILTER_ACCEPT) goto accept; - if (f_run(filter, &rt, tmpa, krt_filter_lp, FF_FORCE_TMPATTR) > F_ACCEPT) + if (f_run(filter, &rt, tmpa, krt_filter_lp, FF_FORCE_TMPATTR | FF_SILENT) > F_ACCEPT) goto reject; |