diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 63b882ac288adf525081725d3360b1444a8673ec..d8e25e08cb7e7b725b3cc5cfb6e34cdf67a11532 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -394,6 +394,8 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) if (tb[IFLA_IFNAME]) nla_strlcpy(ifname, tb[IFLA_IFNAME], IFNAMSIZ); + else + ifname[0] = '\0'; err = -EINVAL; ifm = nlmsg_data(nlh);