summaryrefslogtreecommitdiff
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-12-13 20:16:40 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-12-13 20:16:40 -0300
commit6baeafd1f2a54ca041ff71778ebda9fac75aad12 (patch)
tree57d2d68fa5d1d91f57cd7fcf0aed0a97892cc8cc /net/ipv6/icmp.c
parent189382f7a338c02b448ab27e1d5566e052165dc8 (diff)
Linux-libre 4.8.14-gnuHEADpck-4.8.14-gnumaster
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 7370ad2e6..2772004ba 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -447,8 +447,10 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
if (__ipv6_addr_needs_scope_id(addr_type))
iif = skb->dev->ifindex;
- else
- iif = l3mdev_master_ifindex(skb_dst(skb)->dev);
+ else {
+ dst = skb_dst(skb);
+ iif = l3mdev_master_ifindex(dst ? dst->dev : skb->dev);
+ }
/*
* Must not send error if the source does not uniquely