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

Commit cec04a60 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller
Browse files

rocker: cleanup vlan table on error adding vlan



Basic house keeping: If there is an error adding the router MAC for this
vlan, removing the just installed VLAN table entry to leave device in same
state as before failure.

Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27b808cb
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -4320,7 +4320,12 @@ static int rocker_port_vlan_add(struct rocker_port *rocker_port,
	if (err)
	if (err)
		return err;
		return err;


	return rocker_port_router_mac(rocker_port, trans, 0, htons(vid));
	err = rocker_port_router_mac(rocker_port, trans, 0, htons(vid));
	if (err)
		rocker_port_vlan(rocker_port, trans,
				 ROCKER_OP_FLAG_REMOVE, vid);

	return err;
}
}


static int rocker_port_vlans_add(struct rocker_port *rocker_port,
static int rocker_port_vlans_add(struct rocker_port *rocker_port,