aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r--net/bridge/br_netlink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 5dc66abcc9e2..39ca9796f3f7 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -181,8 +181,11 @@ static int br_set_port_state(struct net_bridge_port *p, u8 state)
181 if (p->br->stp_enabled == BR_KERNEL_STP) 181 if (p->br->stp_enabled == BR_KERNEL_STP)
182 return -EBUSY; 182 return -EBUSY;
183 183
184 /* if device is not up, change is not allowed
185 * if link is not present, only allowable state is disabled
186 */
184 if (!netif_running(p->dev) || 187 if (!netif_running(p->dev) ||
185 (!netif_carrier_ok(p->dev) && state != BR_STATE_DISABLED)) 188 (!netif_oper_up(p->dev) && state != BR_STATE_DISABLED))
186 return -ENETDOWN; 189 return -ENETDOWN;
187 190
188 p->state = state; 191 p->state = state;