diff options
author | Taehee Yoo <ap420073@gmail.com> | 2019-10-30 08:15:12 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-30 11:52:47 -0700 |
commit | c6761cf521f9bffbdcbb619dba665ebf3bcefb1e (patch) | |
tree | 2239aae2ad437c9a5160029dee85b3f6335e7fcf /drivers/net/ethernet/qlogic | |
parent | dc99da4f31ce48d15684bde7916104064520025c (diff) | |
download | linux-c6761cf521f9bffbdcbb619dba665ebf3bcefb1e.tar.gz |
vxlan: fix unexpected failure of vxlan_changelink()
After commit 0ce1822c2a08 ("vxlan: add adjacent link to limit depth
level"), vxlan_changelink() could fail because of
netdev_adjacent_change_prepare().
netdev_adjacent_change_prepare() returns -EEXIST when old lower device
and new lower device are same.
(old lower device is "dst->remote_dev" and new lower device is "lowerdev")
So, before calling it, lowerdev should be NULL if these devices are same.
Test command1:
ip link add dummy0 type dummy
ip link add vxlan0 type vxlan dev dummy0 dstport 4789 vni 1
ip link set vxlan0 type vxlan ttl 5
RTNETLINK answers: File exists
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 0ce1822c2a08 ("vxlan: add adjacent link to limit depth level")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
0 files changed, 0 insertions, 0 deletions