diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-01 12:51:08 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-01 12:55:19 +0200 |
commit | d5b3d845f013f7f332c76e83bb8e867de7d3caee (patch) | |
tree | 2934fc1184a6764edea4dedf2cbd20f4c0508206 /src/network/networkd-netdev.c | |
parent | 1a941ac4b690cb3f4333e35f4a5036fe6fd50ff9 (diff) |
networkd: tunnel - ensure that enslave callback is always invoked
The Link statemachine relies on this, as it would otherwise wait forever. Hook up the tunnels in the
same way as the other NetDev's.
Diffstat (limited to 'src/network/networkd-netdev.c')
-rw-r--r-- | src/network/networkd-netdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c index 13338aec51..a53f046540 100644 --- a/src/network/networkd-netdev.c +++ b/src/network/networkd-netdev.c @@ -222,6 +222,7 @@ static int netdev_enter_ready(NetDev *netdev) { return 0; } +/* callback for netdev's created without a backing Link */ static int netdev_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { NetDev *netdev = userdata; int r; @@ -402,6 +403,7 @@ static int netdev_create(NetDev *netdev, Link *link, sd_rtnl_message_handler_t c return 0; } +/* the callback must be called, possibly after a timeout, as otherwise the Link will hang */ int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) { int r; @@ -415,7 +417,7 @@ int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callbac case NETDEV_KIND_GRE: case NETDEV_KIND_SIT: case NETDEV_KIND_VTI: - return netdev_create_tunnel(link, netdev_create_handler); + return netdev_create_tunnel(netdev, link, callback); default: break; } |