]> git.ipfire.org Git - thirdparty/iproute2.git/commit
iplink_vxlan: take into account preferred_family creating vxlan device
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Fri, 21 Sep 2018 13:34:25 +0000 (15:34 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 25 Sep 2018 07:52:56 +0000 (09:52 +0200)
commitc1360e3b483e54a61a36bd2fdb3bfb91a4d2b32a
tree574132a492b27cfe4a6e772aea1907bc000b9477
parentfa1e658e84ab267bb98955e44774831bb36f3861
iplink_vxlan: take into account preferred_family creating vxlan device

Take into account the configured preferred_family if neither saddr or
daddr are provided since otherwise vxlan kernel module will use IPv4 as
default remote inet family neglecting the one provided by userspace.
This behaviour was originally in commit 97d564b90ccb ("vxlan: use
preferred address family when neither group or remote is specified").
The issue can be triggered with the following reproducer:

$ip -6 link add vxlan1 type vxlan id 42 dev enp0s2 \
     proxy nolearning l2miss l3miss
$bridge fdb add 46:47:1f:a7:1c:25 dev vxlan1 dst 2000::2
RTNETLINK answers: Address family not supported by protocol

Fixes: 1e9b8072de2c ("iplink_vxlan: Get rid of inet_get_addr()")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/iplink_vxlan.c