diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-18 03:36:46 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-18 03:36:46 -0400 |
commit | 0107b3cf3225aed6ddde4fa8dbcd4ed643b34f4d (patch) | |
tree | 9b9337ae627fc56a0eda43c60860765f25efaa0b /net/ipv4/icmp.c | |
parent | 1c3f45ab2f7f879ea482501c83899505c31f7539 (diff) | |
parent | 9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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; | |||
207 | 207 | ||
208 | int sysctl_icmp_ratelimit = 1 * HZ; | 208 | int sysctl_icmp_ratelimit = 1 * HZ; |
209 | int sysctl_icmp_ratemask = 0x1818; | 209 | int sysctl_icmp_ratemask = 0x1818; |
210 | int sysctl_icmp_errors_use_inbound_ifaddr; | ||
210 | 211 | ||
211 | /* | 212 | /* |
212 | * ICMP control array. This specifies what to do with each ICMP. | 213 | * 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) | |||
511 | */ | 512 | */ |
512 | 513 | ||
513 | saddr = iph->daddr; | 514 | saddr = iph->daddr; |
514 | if (!(rt->rt_flags & RTCF_LOCAL)) | 515 | if (!(rt->rt_flags & RTCF_LOCAL)) { |
515 | saddr = 0; | 516 | if (sysctl_icmp_errors_use_inbound_ifaddr) |
517 | saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK); | ||
518 | else | ||
519 | saddr = 0; | ||
520 | } | ||
516 | 521 | ||
517 | tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) | | 522 | tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) | |
518 | IPTOS_PREC_INTERNETCONTROL) : | 523 | IPTOS_PREC_INTERNETCONTROL) : |