mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 11:13:50 +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;
|
||||
|
||||
len = strlen(newname);
|
||||
if (len == 1 || len >= IFNAMSIZ)
|
||||
if (len == 1 || len >= IFNAMSIZ) {
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = -ENOMEM;
|
||||
nlmsg = nlmsg_alloc(NLMSG_GOOD_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user