Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112102
b: refs/heads/master
c: 9174c15
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Oct 8, 2008
1 parent 7b850ae commit ef93850
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 0c4c9288ada0e6642d511ef872f10a4781a896ff
refs/heads/master: 9174c1538fffbb5dddab99563eac6b3d8b212277
6 changes: 3 additions & 3 deletions trunk/net/ipv4/netfilter/nf_nat_rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ static unsigned int ipt_snat_target(struct sk_buff *skb,
}

/* Before 2.6.11 we did implicit source NAT if required. Warn about change. */
static void warn_if_extra_mangle(__be32 dstip, __be32 srcip)
static void warn_if_extra_mangle(struct net *net, __be32 dstip, __be32 srcip)
{
static int warned = 0;
struct flowi fl = { .nl_u = { .ip4_u = { .daddr = dstip } } };
struct rtable *rt;

if (ip_route_output_key(&init_net, &rt, &fl) != 0)
if (ip_route_output_key(net, &rt, &fl) != 0)
return;

if (rt->rt_src != srcip && !warned) {
Expand Down Expand Up @@ -130,7 +130,7 @@ static unsigned int ipt_dnat_target(struct sk_buff *skb,

if (hooknum == NF_INET_LOCAL_OUT &&
mr->range[0].flags & IP_NAT_RANGE_MAP_IPS)
warn_if_extra_mangle(ip_hdr(skb)->daddr,
warn_if_extra_mangle(dev_net(out), ip_hdr(skb)->daddr,
mr->range[0].min_ip);

return nf_nat_setup_info(ct, &mr->range[0], IP_NAT_MANIP_DST);
Expand Down

0 comments on commit ef93850

Please sign in to comment.