diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/icmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index d38cbba92a4d..e238b17f554c 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -514,7 +514,10 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
514 | 514 | ||
515 | saddr = iph->daddr; | 515 | saddr = iph->daddr; |
516 | if (!(rt->rt_flags & RTCF_LOCAL)) { | 516 | if (!(rt->rt_flags & RTCF_LOCAL)) { |
517 | if (sysctl_icmp_errors_use_inbound_ifaddr) | 517 | /* This is broken, skb_in->dev points to the outgoing device |
518 | * after the packet passes through ip_output(). | ||
519 | */ | ||
520 | if (skb_in->dev && sysctl_icmp_errors_use_inbound_ifaddr) | ||
518 | saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK); | 521 | saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK); |
519 | else | 522 | else |
520 | saddr = 0; | 523 | saddr = 0; |