From: David S. Miller Date: Fri, 4 Feb 2011 22:28:58 +0000 (-0800) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: MMI-PSA29.97-13-9~20520^2~415 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bd4a6974cc9090ef3851e5b0a2071e5383565c7c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 --- bd4a6974cc9090ef3851e5b0a2071e5383565c7c diff --cc net/netfilter/xt_iprange.c index d3eb5ed1892f,73c33a42f87f..b46626cddd93 --- a/net/netfilter/xt_iprange.c +++ b/net/netfilter/xt_iprange.c @@@ -75,30 -73,18 +73,30 @@@ iprange_mt6(const struct sk_buff *skb, bool m; if (info->flags & IPRANGE_SRC) { - m = iprange_ipv6_sub(&iph->saddr, &info->src_min.in6) < 0; - m |= iprange_ipv6_sub(&iph->saddr, &info->src_max.in6) > 0; + m = iprange_ipv6_lt(&iph->saddr, &info->src_min.in6); + m |= iprange_ipv6_lt(&info->src_max.in6, &iph->saddr); m ^= !!(info->flags & IPRANGE_SRC_INV); - if (m) + if (m) { + pr_debug("src IP %pI6 NOT in range %s%pI6-%pI6\n", + &iph->saddr, + (info->flags & IPRANGE_SRC_INV) ? "(INV) " : "", + &info->src_min.in6, + &info->src_max.in6); return false; + } } if (info->flags & IPRANGE_DST) { - m = iprange_ipv6_sub(&iph->daddr, &info->dst_min.in6) < 0; - m |= iprange_ipv6_sub(&iph->daddr, &info->dst_max.in6) > 0; + m = iprange_ipv6_lt(&iph->daddr, &info->dst_min.in6); + m |= iprange_ipv6_lt(&info->dst_max.in6, &iph->daddr); m ^= !!(info->flags & IPRANGE_DST_INV); - if (m) + if (m) { + pr_debug("dst IP %pI6 NOT in range %s%pI6-%pI6\n", + &iph->daddr, + (info->flags & IPRANGE_DST_INV) ? "(INV) " : "", + &info->dst_min.in6, + &info->dst_max.in6); return false; + } } return true; }