* [PATCH] ipt_addrtype: Fix matching of inverted destination address type
@ 2008-08-01 21:36 Anders Grafström
2008-08-02 2:35 ` Jan Engelhardt
0 siblings, 1 reply; 4+ messages in thread
From: Anders Grafström @ 2008-08-01 21:36 UTC (permalink / raw)
To: netfilter-devel
This patch fixes matching of inverted destination address type.
Signed-off-by: Anders Grafström <grfstrm@users.sourceforge.net>
---
net/ipv4/netfilter/ipt_addrtype.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c
index 49587a4..1f7e005 100644
--- a/net/ipv4/netfilter/ipt_addrtype.c
+++ b/net/ipv4/netfilter/ipt_addrtype.c
@@ -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;
}
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ipt_addrtype: Fix matching of inverted destination address type
2008-08-01 21:36 [PATCH] ipt_addrtype: Fix matching of inverted destination address type Anders Grafström
@ 2008-08-02 2:35 ` Jan Engelhardt
2008-08-03 14:58 ` Anders Grafström
0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2008-08-02 2:35 UTC (permalink / raw)
To: Anders Grafström; +Cc: netfilter-devel
On Friday 2008-08-01 17:36, Anders Grafström wrote:
> +++ b/net/ipv4/netfilter/ipt_addrtype.c
> @@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipt_addrtype: Fix matching of inverted destination address type
2008-08-02 2:35 ` Jan Engelhardt
@ 2008-08-03 14:58 ` Anders Grafström
2008-08-04 11:27 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Anders Grafström @ 2008-08-03 14:58 UTC (permalink / raw)
To: netfilter-devel; +Cc: Jan Engelhardt
[PATCH] ipt_addrtype: Fix matching of inverted destination address type
This patch fixes matching of inverted destination address type.
Signed-off-by: Anders Grafström <grfstrm@users.sourceforge.net>
---
Ok, here's the revised patch.
net/ipv4/netfilter/ipt_addrtype.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c
index 49587a4..462a22c 100644
--- a/net/ipv4/netfilter/ipt_addrtype.c
+++ b/net/ipv4/netfilter/ipt_addrtype.c
@@ -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;
}
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-04 11:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 21:36 [PATCH] ipt_addrtype: Fix matching of inverted destination address type Anders Grafström
2008-08-02 2:35 ` Jan Engelhardt
2008-08-03 14:58 ` Anders Grafström
2008-08-04 11:27 ` Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.