b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/networking/libiproute/iplink.c |
2 | +++ b/networking/libiproute/iplink.c | ||||
3 | @@ -683,7 +683,7 @@ static int do_add_or_delete(char **argv, | ||||
4 | } | ||||
5 | xrtnl_open(&rth); | ||||
6 | ll_init_map(&rth); | ||||
7 | - if (type_str) { | ||||
8 | + if (type_str && rtm == RTM_NEWLINK) { | ||||
9 | struct rtattr *linkinfo = NLMSG_TAIL(&req.n); | ||||
10 | |||||
11 | addattr_l(&req.n, sizeof(req), IFLA_LINKINFO, NULL, 0); |