ipt_addrtype: Fix matching of inverted destination address type
Subsystems (2)
PATCH 1/1 ipt_addrtype: Fix matching of inverted destination address type
This patch fixes matching of inverted destination address type.
--- net/ipv4/netfilter/ipt_addrtype.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/netfilter/ipt_addrtype.c +1 -1
@@ -70,7 +70,7 @@ addrtype_mt_v1(const struct sk_buff *skb, const struct net_device *in, (info->flags &IPT_ADDRTYPE_INVERT_SOURCE );if (ret && info->dest) ret &=match_type (dev, iph->daddr, info->dest) ^ - (info->flags &IPT_ADDRTYPE_INVERT_DEST ); + (info->flags &IPT_ADDRTYPE_INVERT_DEST ) >>1 ;return ret; }
Signature · 5 lines
1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
net/ipv4/netfilter/ipt_addrtype.c addrtype_mt_v1(const struct sk_buff *skb, const struct · line 74
Quoted 8 lines · Anders Grafström
+++
b/net/ipv4/netfilter/ipt_addrtype.cnet/ipv4/netfilter/ipt_addrtype.c +1
-1@@ -70,7 +70,7 @@ addrtype_mt_v1(const struct sk_buff *skb, const struct net_device *in, (info->flags &IPT_ADDRTYPE_INVERT_SOURCE );if (ret && info->dest) ret &=match_type (dev, iph->daddr, info->dest) ^ - (info->flags &IPT_ADDRTYPE_INVERT_DEST ); + (info->flags &IPT_ADDRTYPE_INVERT_DEST ) >>1 ;
I'd just use !!(info->flags & IPT_ADDRTYPE_INVERT_DEST);
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ipt_addrtype: Fix matching of inverted destination address type
This patch fixes matching of inverted destination address type.
---
Ok, here's the revised patch.
net/ipv4/netfilter/ipt_addrtype.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/netfilter/ipt_addrtype.c +1 -1
@@ -70,7 +70,7 @@ addrtype_mt_v1(const struct sk_buff *skb, const struct net_device *in, (info->flags &IPT_ADDRTYPE_INVERT_SOURCE );if (ret && info->dest) ret &=match_type (dev, iph->daddr, info->dest) ^ - (info->flags &IPT_ADDRTYPE_INVERT_DEST ); + !!(info->flags &IPT_ADDRTYPE_INVERT_DEST );return ret; }
Signature · 6 lines
1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Anders Grafström
[PATCH]
ipt_addrtype: Fix matching of inverted destination address typeThis patch fixes matching of inverted destination address type.
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html