aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 02a899bec196..68a22670f597 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -517,7 +517,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
517 struct net_device *dev = NULL; 517 struct net_device *dev = NULL;
518 518
519 if (rt->fl.iif && sysctl_icmp_errors_use_inbound_ifaddr) 519 if (rt->fl.iif && sysctl_icmp_errors_use_inbound_ifaddr)
520 dev = dev_get_by_index(rt->fl.iif); 520 dev = dev_get_by_index(&init_net, rt->fl.iif);
521 521
522 if (dev) { 522 if (dev) {
523 saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK); 523 saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK);