]> 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)
commitce0403509873d53b6c70764c97b15a57b4e41529
tree51653355c4a333e63551c58934629881bb0856a2
parent9b00e044360ff66c8e69bd9f68d0e9c6786a8476
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