浏览代码

netfilter: 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>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Anders Grafström 17 年之前
父节点
当前提交
46faec9858
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/ipv4/netfilter/ipt_addrtype.c

+ 1 - 1
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);
 		       (info->flags & IPT_ADDRTYPE_INVERT_SOURCE);
 	if (ret && info->dest)
 	if (ret && info->dest)
 		ret &= match_type(dev, iph->daddr, info->dest) ^
 		ret &= match_type(dev, iph->daddr, info->dest) ^
-		       (info->flags & IPT_ADDRTYPE_INVERT_DEST);
+		       !!(info->flags & IPT_ADDRTYPE_INVERT_DEST);
 	return ret;
 	return ret;
 }
 }