]> err.no Git - linux-2.6/commitdiff
[NETFILTER]: xt_conntrack: fix IPv4 address comparison
authorJan Engelhardt <jengelh@computergmbh.de>
Wed, 27 Feb 2008 20:20:41 +0000 (12:20 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Feb 2008 20:20:41 +0000 (12:20 -0800)
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/xt_conntrack.c

index dd192ac74b4aebfabc39bdb179d5b6dc608dd783..0c50b289405537348d4004108e7559169ff9031e 100644 (file)
@@ -122,7 +122,7 @@ conntrack_addrcmp(const union nf_inet_addr *kaddr,
                   const union nf_inet_addr *umask, unsigned int l3proto)
 {
        if (l3proto == AF_INET)
-               return (kaddr->ip & umask->ip) == uaddr->ip;
+               return ((kaddr->ip ^ uaddr->ip) & umask->ip) == 0;
        else if (l3proto == AF_INET6)
                return ipv6_masked_addr_cmp(&kaddr->in6, &umask->in6,
                       &uaddr->in6) == 0;