Commit 67f0857a authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by James Morris

[BRIDGE]: handle out-of-ports corner case.

parent b4fa838b
......@@ -155,8 +155,6 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, struct net_device
p->path_cost = br_initial_port_cost(dev);
p->priority = 0x80;
dev->br_port = p;
for (i=1;i<255;i++)
if (br_get_port(br, i) == NULL)
break;
......@@ -166,6 +164,8 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, struct net_device
return NULL;
}
dev->br_port = p;
p->port_no = i;
br_init_port(p);
p->state = BR_STATE_DISABLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment