Skip to content

Commit 5d41ce2

Browse files
David Aherndavem330
authored andcommitted
net: icmp6_send should use dst dev to determine L3 domain
icmp6_send is called in response to some event. The skb may not have the device set (skb->dev is NULL), but it is expected to have a dst set. Update icmp6_send to use the dst on the skb to determine L3 domain. Fixes: ca25449 ("net: Add VRF support to IPv6 stack") Signed-off-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 20b2b24 commit 5d41ce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/icmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
448448
if (__ipv6_addr_needs_scope_id(addr_type))
449449
iif = skb->dev->ifindex;
450450
else
451-
iif = l3mdev_master_ifindex(skb->dev);
451+
iif = l3mdev_master_ifindex(skb_dst(skb)->dev);
452452

453453
/*
454454
* Must not send error if the source does not uniquely

0 commit comments

Comments
 (0)