diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-13 16:24:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-13 16:24:01 -0700 |
commit | 814d8ffd5009e13f1266759b583ef847c5350d77 (patch) | |
tree | 00b01e4ccac6ba82ab5e67c27103f6f75f8ccf9d /net/ipv4/icmp.c | |
parent | 386bfcf5e8a3c34d92156c945c8db58a1e2f7c69 (diff) | |
parent | 1c2fb7f93cb20621772bf304f3dba0849942e5db (diff) | |
download | linux-rt-814d8ffd5009e13f1266759b583ef847c5350d77.tar.gz |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 85bf0d3e294b..cb759484979d 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -207,6 +207,7 @@ int sysctl_icmp_ignore_bogus_error_responses; int sysctl_icmp_ratelimit = 1 * HZ; int sysctl_icmp_ratemask = 0x1818; +int sysctl_icmp_errors_use_inbound_ifaddr; /* * ICMP control array. This specifies what to do with each ICMP. @@ -511,8 +512,12 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info) */ saddr = iph->daddr; - if (!(rt->rt_flags & RTCF_LOCAL)) - saddr = 0; + if (!(rt->rt_flags & RTCF_LOCAL)) { + if (sysctl_icmp_errors_use_inbound_ifaddr) + saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK); + else + saddr = 0; + } tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) | IPTOS_PREC_INTERNETCONTROL) : |