diff options
-rw-r--r-- | drivers/net/vxlan.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 51e10f47d4f1..83f65eb3085f 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -3809,15 +3809,6 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[], | |||
3809 | /* handle default dst entry */ | 3809 | /* handle default dst entry */ |
3810 | if (!vxlan_addr_equal(&conf.remote_ip, &dst->remote_ip)) { | 3810 | if (!vxlan_addr_equal(&conf.remote_ip, &dst->remote_ip)) { |
3811 | spin_lock_bh(&vxlan->hash_lock); | 3811 | spin_lock_bh(&vxlan->hash_lock); |
3812 | if (!vxlan_addr_any(&dst->remote_ip)) | ||
3813 | __vxlan_fdb_delete(vxlan, all_zeros_mac, | ||
3814 | dst->remote_ip, | ||
3815 | vxlan->cfg.dst_port, | ||
3816 | dst->remote_vni, | ||
3817 | dst->remote_vni, | ||
3818 | dst->remote_ifindex, | ||
3819 | true); | ||
3820 | |||
3821 | if (!vxlan_addr_any(&conf.remote_ip)) { | 3812 | if (!vxlan_addr_any(&conf.remote_ip)) { |
3822 | err = vxlan_fdb_update(vxlan, all_zeros_mac, | 3813 | err = vxlan_fdb_update(vxlan, all_zeros_mac, |
3823 | &conf.remote_ip, | 3814 | &conf.remote_ip, |
@@ -3832,6 +3823,14 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[], | |||
3832 | return err; | 3823 | return err; |
3833 | } | 3824 | } |
3834 | } | 3825 | } |
3826 | if (!vxlan_addr_any(&dst->remote_ip)) | ||
3827 | __vxlan_fdb_delete(vxlan, all_zeros_mac, | ||
3828 | dst->remote_ip, | ||
3829 | vxlan->cfg.dst_port, | ||
3830 | dst->remote_vni, | ||
3831 | dst->remote_vni, | ||
3832 | dst->remote_ifindex, | ||
3833 | true); | ||
3835 | spin_unlock_bh(&vxlan->hash_lock); | 3834 | spin_unlock_bh(&vxlan->hash_lock); |
3836 | } | 3835 | } |
3837 | 3836 | ||