Skip to content

Commit

Permalink
net: icmp6_send should use dst dev to determine L3 domain
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
David Ahern authored and davem330 committed Nov 8, 2016
1 parent 20b2b24 commit 5d41ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ 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->dev);
iif = l3mdev_master_ifindex(skb_dst(skb)->dev);

/*
* Must not send error if the source does not uniquely
Expand Down

0 comments on commit 5d41ce2

Please sign in to comment.