Handle netdev group for veth peer too
Currently ip-link(8) parses, but ignores "group" argument to
peer interface on veth creation.
Insert IFLA_GROUP attribute for peer interface when present.
Signed-off-by: Sergey Popovich <popovich_sergei@mail.ru>
diff --git a/ip/link_veth.c b/ip/link_veth.c
index f357182..62cb5a5 100644
--- a/ip/link_veth.c
+++ b/ip/link_veth.c
@@ -56,6 +56,9 @@
addattr_l(hdr, 1024, IFLA_IFNAME, name, len);
}
+ if (group != -1)
+ addattr32(hdr, 1024, IFLA_GROUP, group);
+
data->rta_len = (void *)NLMSG_TAIL(hdr) - (void *)data;
return argc - 1 - err;
}