Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236808
b: refs/heads/master
c: 6a4ddef
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Jacob authored and Patrick McHardy committed Jan 28, 2011
1 parent 3d555b9 commit 9f7c389
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 705ca147176090203afd7503392e6e770637499b
refs/heads/master: 6a4ddef2a3805d5b0664a94579b7a651bc202266
16 changes: 14 additions & 2 deletions trunk/net/netfilter/xt_iprange.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,27 @@ iprange_mt6(const struct sk_buff *skb, struct xt_action_param *par)
m = iprange_ipv6_sub(&iph->saddr, &info->src_min.in6) < 0;
m |= iprange_ipv6_sub(&iph->saddr, &info->src_max.in6) > 0;
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 ^= !!(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;
}
Expand Down

0 comments on commit 9f7c389

Please sign in to comment.