aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index eb948ffd734b..17fa28f7a0ff 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -448,8 +448,10 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
448 448
449 if (__ipv6_addr_needs_scope_id(addr_type)) 449 if (__ipv6_addr_needs_scope_id(addr_type))
450 iif = skb->dev->ifindex; 450 iif = skb->dev->ifindex;
451 else 451 else {
452 iif = l3mdev_master_ifindex(skb_dst(skb)->dev); 452 dst = skb_dst(skb);
453 iif = l3mdev_master_ifindex(dst ? dst->dev : skb->dev);
454 }
453 455
454 /* 456 /*
455 * Must not send error if the source does not uniquely 457 * Must not send error if the source does not uniquely