diff options
author | Scott Wood <scottwood@freescale.com> | 2013-05-20 18:39:02 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-05-20 18:39:02 (GMT) |
commit | b08bbdbf93d9862b77d41560c1447f37c3954930 (patch) | |
tree | 1defef32b478eead9fbcfc4646900a4122a86172 /net/ipv4/netfilter | |
parent | 84df6e416de47ccca8845e584ef3683ad068b790 (diff) | |
parent | dbf932a9b316d5b29b3e220e5a30e7a165ad2992 (diff) | |
download | linux-fsl-qoriq-b08bbdbf93d9862b77d41560c1447f37c3954930.tar.xz |
Merge tag 'v3.8.13'
This is the 3.8.13 stable release
Diffstat (limited to 'net/ipv4/netfilter')
-rw-r--r-- | net/ipv4/netfilter/ipt_rpfilter.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_rpfilter.c b/net/ipv4/netfilter/ipt_rpfilter.c index c301300..c49dcd0 100644 --- a/net/ipv4/netfilter/ipt_rpfilter.c +++ b/net/ipv4/netfilter/ipt_rpfilter.c @@ -66,6 +66,12 @@ static bool rpfilter_lookup_reverse(struct flowi4 *fl4, return dev_match; } +static bool rpfilter_is_local(const struct sk_buff *skb) +{ + const struct rtable *rt = skb_rtable(skb); + return rt && (rt->rt_flags & RTCF_LOCAL); +} + static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par) { const struct xt_rpfilter_info *info; @@ -76,7 +82,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par) info = par->matchinfo; invert = info->flags & XT_RPFILTER_INVERT; - if (par->in->flags & IFF_LOOPBACK) + if (rpfilter_is_local(skb)) return true ^ invert; iph = ip_hdr(skb); |