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>
This commit is contained in:
parent
be2c3142f9
commit
e0d47aa303
|
|
@ -56,6 +56,9 @@ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
|
||||||
addattr_l(hdr, 1024, IFLA_IFNAME, name, len);
|
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;
|
data->rta_len = (void *)NLMSG_TAIL(hdr) - (void *)data;
|
||||||
return argc - 1 - err;
|
return argc - 1 - err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue