]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: fix ordering of NEWLINK and NEWNEIGH events
authorstephen hemminger <shemminger@vyatta.com>
Fri, 30 Sep 2011 14:37:26 +0000 (14:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2011 16:17:33 +0000 (12:17 -0400)
commit74b0b5670ad76242ac76033402782978958c3ef9
tree51653355c4a333e63551c58934629881bb0856a2
parenta1d066c7da67567943feadd877f6d83e3d3e667b
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