提交 cec04a60 编写于 作者: S Scott Feldman 提交者: David S. Miller

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: NScott Feldman <sfeldma@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 27b808cb
......@@ -4320,7 +4320,12 @@ static int rocker_port_vlan_add(struct rocker_port *rocker_port,
if (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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册