bridge: fix ordering of NEWLINK and NEWNEIGH events
commit77f9859837cbe262ef2aa12fc38d18458814c2ca
authorstephen hemminger <shemminger@vyatta.com>
Fri, 30 Sep 2011 14:37:26 +0000 (30 14:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2011 16:17:33 +0000 (3 12:17 -0400)
tree51653355c4a333e63551c58934629881bb0856a2
parent3de09455cfcde1898fb435ad425b9ad5d13ed362
bridge: fix ordering of NEWLINK and NEWNEIGH events

When port is added to a bridge, the old code would send the new neighbor
netlink message before the subsequent new link message. This bug makes
it difficult to use the monitoring API in an application.

This code changes the ordering to add the forwarding entry
after the port is setup. One of the error checks (for invalid address)
is moved earlier in the process to avoid having to do unwind.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_if.c