Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6351
b: refs/heads/master
c: 000efe1
h: refs/heads/master
i:
  6349: 0309143
  6347: c5283c2
  6343: 5188368
  6335: 0465be8
v: v3
  • Loading branch information
Gary Wayne Smith authored and David S. Miller committed Aug 29, 2005
1 parent badbb9c commit 8774c65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 9baa5c67ff4ce57b6b9f68c90714a1bb876fccd7
refs/heads/master: 000efe1d86620244b8e017429e57fab4170ab05a
8 changes: 5 additions & 3 deletions trunk/net/ipv4/netfilter/ipt_NETMAP.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ check(const char *tablename,
DEBUGP(MODULENAME":check: size %u.\n", targinfosize);
return 0;
}
if (hook_mask & ~((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_POST_ROUTING))) {
if (hook_mask & ~((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_POST_ROUTING) |
(1 << NF_IP_LOCAL_OUT))) {
DEBUGP(MODULENAME":check: bad hooks %x.\n", hook_mask);
return 0;
}
Expand Down Expand Up @@ -76,12 +77,13 @@ target(struct sk_buff **pskb,
struct ip_nat_range newrange;

IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
|| hooknum == NF_IP_POST_ROUTING);
|| hooknum == NF_IP_POST_ROUTING
|| hooknum == NF_IP_LOCAL_OUT);
ct = ip_conntrack_get(*pskb, &ctinfo);

netmask = ~(mr->range[0].min_ip ^ mr->range[0].max_ip);

if (hooknum == NF_IP_PRE_ROUTING)
if (hooknum == NF_IP_PRE_ROUTING || hooknum == NF_IP_LOCAL_OUT)
new_ip = (*pskb)->nh.iph->daddr & ~netmask;
else
new_ip = (*pskb)->nh.iph->saddr & ~netmask;
Expand Down

0 comments on commit 8774c65

Please sign in to comment.