Skip to content
  • Marcelo Ricardo Leitner's avatar
    vxlan: Move socket initialization to within rtnl scope · 56ef9c90
    Marcelo Ricardo Leitner authored
    
    
    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: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    56ef9c90