aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 2fcf588bf..30d189667 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -257,8 +257,8 @@ static void netlink_device_change(int sock, const char* name, bool up,
memset(&hdr, 0, sizeof(hdr));
if (up)
hdr.ifi_flags = hdr.ifi_change = IFF_UP;
+ hdr.ifi_index = if_nametoindex(name);
netlink_init(RTM_NEWLINK, 0, &hdr, sizeof(hdr));
- netlink_attr(IFLA_IFNAME, name, strlen(name));
if (master) {
int ifindex = if_nametoindex(master);
netlink_attr(IFLA_MASTER, &ifindex, sizeof(ifindex));