diff options
author | David S. Miller <davem@davemloft.net> | 2016-02-26 14:22:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-26 14:22:27 -0500 |
commit | c3f463baae6eec589f7648604cafefdfe4b85288 (patch) | |
tree | bcc1fba749c6ac53e1f4af1d5ccf8972ec5c8f45 /net/ipv6/udp_offload.c | |
parent | 8d3f2806f8fbd9b222b3504580b5eaa9ba2964b8 (diff) | |
parent | 17b693cdd87635ae813ad61ad0b8a8458f4c3960 (diff) | |
download | linux-c3f463baae6eec589f7648604cafefdfe4b85288.tar.bz2 |
Merge branch 'vrf-saddr-selection'
David Ahern says:
====================
net: l3mdev: Fix source address for unnumbered deployments
David Lamparter noted a use case where the source address selection fails
to pick an address from a VRF interface - unnumbered interfaces. The use
case has the VRF device as the VRF local loopback with addresses and
interfaces enslaved without an address themselves. e.g,
ip addr add 9.9.9.9/32 dev lo
ip link set lo up
ip link add name vrf0 type vrf table 101
ip rule add oif vrf0 table 101
ip rule add iif vrf0 table 101
ip link set vrf0 up
ip addr add 10.0.0.3/32 dev vrf0
ip link add name dummy2 type dummy
ip link set dummy2 master vrf0 up
--> note dummy2 has no address - unnumbered device
ip route add 10.2.2.2/32 dev dummy2 table 101
ip neigh add 10.2.2.2 dev dummy2 lladdr 02:00:00:00:00:02
ping to the 10.2.2.2 through the L3 domain:
$ ping -I vrf0 -c1 10.2.2.2
ping: Warning: source address might be selected on device other than vrf0.
PING 10.2.2.2 (10.2.2.2) from 9.9.9.9 vrf0: 56(84) bytes of data.
picks up the wrong address -- the one from 'lo' not vrf0. And from tcpdump:
12:57:29.449128 IP 9.9.9.9 > 10.2.2.2: ICMP echo request, id 2491, seq 1, length 64
This patch series changes address selection to only consider devices in
the same L3 domain and to use the VRF device as the L3 domains loopback.
$ ping -I vrf0 -c1 10.2.2.2
PING 10.2.2.2 (10.2.2.2) from 10.0.0.3 vrf0: 56(84) bytes of data.
From tcpdump:
12:59:25.096426 IP 10.0.0.3 > 10.2.2.2: ICMP echo request, id 2113, seq 1, length 64
Now the source address comes from vrf0.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp_offload.c')
0 files changed, 0 insertions, 0 deletions