diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2008-01-10 06:25:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:27 -0500 |
commit | 6b175b26c1048d331508940ad3516ead1998084f (patch) | |
tree | 810b0a18cee4d87c573274fdfd4a59fc624cfed2 /net/ipv4/icmp.c | |
parent | 8ad4942cd5bdad4143f7aa1d1bd4f7b2526c19c5 (diff) |
[NETNS]: Add netns parameter to inet_(dev_)add_type.
The patch extends the inet_addr_type and inet_dev_addr_type with the
network namespace pointer. That allows to access the different tables
relatively to the network namespace.
The modification of the signature function is reported in all the
callers of the inet_addr_type using the pointer to the well known
init_net.
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 1a6024978e28..e57f1673bf6b 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -590,7 +590,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
590 | if (xfrm_decode_session_reverse(skb_in, &fl, AF_INET)) | 590 | if (xfrm_decode_session_reverse(skb_in, &fl, AF_INET)) |
591 | goto out_unlock; | 591 | goto out_unlock; |
592 | 592 | ||
593 | if (inet_addr_type(fl.fl4_src) == RTN_LOCAL) | 593 | if (inet_addr_type(&init_net, fl.fl4_src) == RTN_LOCAL) |
594 | err = __ip_route_output_key(&rt2, &fl); | 594 | err = __ip_route_output_key(&rt2, &fl); |
595 | else { | 595 | else { |
596 | struct flowi fl2 = {}; | 596 | struct flowi fl2 = {}; |
@@ -733,7 +733,7 @@ static void icmp_unreach(struct sk_buff *skb) | |||
733 | */ | 733 | */ |
734 | 734 | ||
735 | if (!sysctl_icmp_ignore_bogus_error_responses && | 735 | if (!sysctl_icmp_ignore_bogus_error_responses && |
736 | inet_addr_type(iph->daddr) == RTN_BROADCAST) { | 736 | inet_addr_type(&init_net, iph->daddr) == RTN_BROADCAST) { |
737 | if (net_ratelimit()) | 737 | if (net_ratelimit()) |
738 | printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP " | 738 | printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP " |
739 | "type %u, code %u " | 739 | "type %u, code %u " |