]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: Move socket initialization to within rtnl scope
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Wed, 18 Mar 2015 17:50:44 +0000 (14:50 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Mar 2015 02:05:10 +0000 (22:05 -0400)
commitb6d34811a41fcdfaa83e74a46fd2c2e773dbe834
tree71163c8606ff1f64ac22e358c501fbb6667e0ea6
parent7439d36eaad86ccdd39a75044109e8e9cc2e6d6b
vxlan: Move socket initialization to within rtnl scope

Currently, if a multicast join operation fail, the vxlan interface will
be UP but not functional, without even a log message informing the user.

Now that we can grab socket lock after already having rntl, we don't
need to defer socket creation and multicast operations. By not deferring
we can do proper error reporting to the user through ip exit code.

This patch thus removes all deferred work that vxlan had and put it back
inline. Now the socket will only be created, bound and join multicast
group when one bring the interface up, and will undo all that as soon as
one put the interface down.

As vxlan_sock_hold() is not used after this patch, it was removed too.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c