Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122369
b: refs/heads/master
c: 6e3354c
h: refs/heads/master
i:
  122367: b6d9ffb
v: v3
  • Loading branch information
Simon Arlott authored and Patrick McHardy committed Nov 4, 2008
1 parent 94c4a3b commit 25d78cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 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: 249b62035ca247b9cedbefa1acf6bdc53b96e678
refs/heads/master: 6e3354c1e9946fa585de40e93ad917ec7abd006e
23 changes: 0 additions & 23 deletions trunk/net/ipv4/netfilter/nf_nat_rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ ipt_snat_target(struct sk_buff *skb, const struct xt_target_param *par)
return nf_nat_setup_info(ct, &mr->range[0], IP_NAT_MANIP_SRC);
}

/* Before 2.6.11 we did implicit source NAT if required. Warn about change. */
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(net, &rt, &fl) != 0)
return;

if (rt->rt_src != srcip && !warned) {
printk("NAT: no longer support implicit source local NAT\n");
printk("NAT: packet src %pI4 -> dst %pI4\n", &srcip, &dstip);
warned = 1;
}
ip_rt_put(rt);
}

static unsigned int
ipt_dnat_target(struct sk_buff *skb, const struct xt_target_param *par)
{
Expand All @@ -119,11 +101,6 @@ ipt_dnat_target(struct sk_buff *skb, const struct xt_target_param *par)
/* Connection must be valid and new. */
NF_CT_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED));

if (par->hooknum == NF_INET_LOCAL_OUT &&
mr->range[0].flags & IP_NAT_RANGE_MAP_IPS)
warn_if_extra_mangle(dev_net(par->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 25d78cb

Please sign in to comment.