]> asedeno.scripts.mit.edu Git - linux.git/commit
net/ipv6: Change ip6_route_get_saddr to get dev from route
authorDavid Ahern <dsahern@gmail.com>
Wed, 18 Apr 2018 22:39:03 +0000 (15:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Apr 2018 19:40:13 +0000 (15:40 -0400)
commit6fe749414446d86cfaae1c84bfdd556fe4fa8fca
tree698e52234d27958caf294af6a6dd26995d94c44c
parenteea68cd371a8fa7d8dbfcf75bc076e8379526119
net/ipv6: Change ip6_route_get_saddr to get dev from route

Prior to 4832c30d5458 ("net: ipv6: put host and anycast routes on device
with address") host routes and anycast routes were installed with the
device set to loopback (or VRF device once that feature was added). In the
older code dst.dev was set to loopback (needed for packet tx) and rt6i_idev
was used to denote the actual interface.

Commit 4832c30d5458 changed the code to have dst.dev pointing to the real
device with the switch to lo or vrf device done on dst clones. As a
consequence of this change ip6_route_get_saddr can just pass the nexthop
device to ipv6_dev_get_saddr.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h