lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 3 Feb 2016 15:27:47 +0100 From: "Jason A. Donenfeld" <Jason@...c4.com> To: Netdev <netdev@...r.kernel.org>, David Miller <davem@...emloft.net>, "Eric W. Biederman" <ebiederm@...ssion.com>, dsa@...ulusnetworks.com Subject: Re: [RFC] Inverse of flowi{4,6}_oif: flowi{4,6}_not_oif FYI, for v4 at least, it's ridiculously easy and simple to implement: =~=~=~=~=~=~=~=~= diff --git a/include/net/flow.h b/include/net/flow.h index 83969ee..29967ad 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -26,6 +26,7 @@ struct flowi_tunnel { struct flowi_common { int flowic_oif; + int flowic_not_oif; int flowic_iif; __u32 flowic_mark; __u8 flowic_tos; @@ -67,6 +68,7 @@ union flowi_uli { struct flowi4 { struct flowi_common __fl_common; #define flowi4_oif __fl_common.flowic_oif +#define flowi4_not_oif __fl_common.flowic_not_oif #define flowi4_iif __fl_common.flowic_iif #define flowi4_mark __fl_common.flowic_mark #define flowi4_tos __fl_common.flowic_tos diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 7aea0cc..d03e991 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -1429,6 +1429,8 @@ found: flp->flowi4_oif != nh->nh_oif) continue; } + if (flp->flowi4_not_oif && flp->flowi4_not_oif == nh->nh_oif) + continue; if (!(fib_flags & FIB_LOOKUP_NOREF)) atomic_inc(&fi->fib_clntref);
Powered by blists - more mailing lists