Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8db9427d authored by Petr Machata's avatar Petr Machata Committed by David S. Miller
Browse files

vxlan: changelink: Inline vxlan_dev_configure()



The changelink operation may cause change in remote address, and
therefore an FDB update, which can be vetoed. To properly handle
vetoing, vxlan_changelink() needs to be gradually updated.

In this patch simply replace vxlan_dev_configure() with the two
constituent calls.

Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 61f46fe8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3793,6 +3793,7 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
	struct vxlan_dev *vxlan = netdev_priv(dev);
	struct vxlan_rdst *dst = &vxlan->default_dst;
	unsigned long old_age_interval;
	struct net_device *lowerdev;
	struct vxlan_rdst old_dst;
	struct vxlan_config conf;
	int err;
@@ -3805,10 +3806,13 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
	old_age_interval = vxlan->cfg.age_interval;
	memcpy(&old_dst, dst, sizeof(struct vxlan_rdst));

	err = vxlan_dev_configure(vxlan->net, dev, &conf, true, extack);
	err = vxlan_config_validate(vxlan->net, &conf, &lowerdev,
				    vxlan, extack);
	if (err)
		return err;

	vxlan_config_apply(dev, &conf, lowerdev, vxlan->net, true);

	if (old_age_interval != vxlan->cfg.age_interval)
		mod_timer(&vxlan->age_timer, jiffies);