aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/generated.go
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-11-12 11:46:57 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-11-14 09:21:37 +0100
commit966d14f910ba7efd83e330eafe712304dc436dc8 (patch)
tree64de38a39f2e9e6fc86bd9f8c4c6631e8b3e880d /pkg/csource/generated.go
parentd5f798b079efa4c95ac265a974e12d0c07685757 (diff)
executor: identify netdev by ifindex in netlink_device_change()
IFLA_NAME is going to be used to set the name of the netdevice, so change the handle to be ifindex. Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Diffstat (limited to 'pkg/csource/generated.go')
-rw-r--r--pkg/csource/generated.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 96ba37e20..f7b6a81d9 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -1281,8 +1281,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));