Unverified Commit bd6c1ff6 by Stéphane Graber Committed by GitHub

Merge pull request #3046 from brauner/lxc/master

network: fix lxc_netdev_rename_by_index()
parents f00010ff 90d79629
...@@ -1160,8 +1160,10 @@ int lxc_netdev_rename_by_index(int ifindex, const char *newname) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment