diff --git a/src/lxc/network.c b/src/lxc/network.c index f73e57dba..e5dc34df2 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -140,10 +140,11 @@ int lxc_netdev_move_by_name(char *ifname, pid_t pid) { int index; - index = if_nametoindex(ifname); if (!ifname) return -EINVAL; + index = if_nametoindex(ifname); + return lxc_netdev_move_by_index(index, pid); }