提交 6d5ba6b1 编写于 作者: M Martin Kletzander

Revert "ip link needs 'name' in 3.16 to create the veth pair"

This reverts commit 433b427f.

The patch was added in order to overcome a bug in iproute2 and since it
was properly identified as a bug, particularly in openSUSE 13.2, and it
is being worked on [1], the best solution for libvirt seems to be to
keep the old behaviour.

[1] https://bugzilla.novell.com/show_bug.cgi?id=907093
上级 dabb23e6
...@@ -89,7 +89,7 @@ static int virNetDevVethGetFreeNum(int startDev) ...@@ -89,7 +89,7 @@ static int virNetDevVethGetFreeNum(int startDev)
* @veth2: pointer to return name for container end of veth pair * @veth2: pointer to return name for container end of veth pair
* *
* Creates a veth device pair using the ip command: * Creates a veth device pair using the ip command:
* ip link add name veth1 type veth peer name veth2 * ip link add veth1 type veth peer name veth2
* If veth1 points to NULL on entry, it will be a valid interface on * If veth1 points to NULL on entry, it will be a valid interface on
* return. veth2 should point to NULL on entry. * return. veth2 should point to NULL on entry.
* *
...@@ -146,7 +146,7 @@ int virNetDevVethCreate(char** veth1, char** veth2) ...@@ -146,7 +146,7 @@ int virNetDevVethCreate(char** veth1, char** veth2)
} }
cmd = virCommandNew("ip"); cmd = virCommandNew("ip");
virCommandAddArgList(cmd, "link", "add", "name", virCommandAddArgList(cmd, "link", "add",
*veth1 ? *veth1 : veth1auto, *veth1 ? *veth1 : veth1auto,
"type", "veth", "peer", "name", "type", "veth", "peer", "name",
*veth2 ? *veth2 : veth2auto, *veth2 ? *veth2 : veth2auto,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册