Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57332
b: refs/heads/master
c: 6e1d910
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jun 4, 2007
1 parent 593d576 commit b2da50a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: 584bdf8cbdf6f277c2a00e083257ee75687cf6f4
refs/heads/master: 6e1d91039becc9d5bcd046d8c709dbaf471220e3
15 changes: 9 additions & 6 deletions trunk/net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,15 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)

saddr = iph->daddr;
if (!(rt->rt_flags & RTCF_LOCAL)) {
/* This is broken, skb_in->dev points to the outgoing device
* after the packet passes through ip_output().
*/
if (skb_in->dev && sysctl_icmp_errors_use_inbound_ifaddr)
saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK);
else
struct net_device *dev = NULL;

if (rt->fl.iif && sysctl_icmp_errors_use_inbound_ifaddr)
dev = dev_get_by_index(rt->fl.iif);

if (dev) {
saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK);
dev_put(dev);
} else
saddr = 0;
}

Expand Down

0 comments on commit b2da50a

Please sign in to comment.