mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 15:49:25 +00:00
Merge pull request #3046 from brauner/lxc/master
network: fix lxc_netdev_rename_by_index()
This commit is contained in:
commit
bd6c1ff60b
@ -1160,8 +1160,10 @@ int lxc_netdev_rename_by_index(int ifindex, const char *newname)
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
len = strlen(newname);
|
len = strlen(newname);
|
||||||
if (len == 1 || len >= IFNAMSIZ)
|
if (len == 1 || len >= IFNAMSIZ) {
|
||||||
|
err = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
nlmsg = nlmsg_alloc(NLMSG_GOOD_SIZE);
|
nlmsg = nlmsg_alloc(NLMSG_GOOD_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user