aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2016-09-13 17:11:54 +1000
committerJason Wang <jasowang@redhat.com>2016-09-27 17:54:22 +0800
commit584613eacb3840c1803e665ed7edd4ac186deced (patch)
tree3a8612612046148dafead193f3b905c07645f6f4 /net
parentfb56d323e2c9472ba4c25fc0f13f2aaddda62380 (diff)
tap: Allow specifying a bridge
The tap backend is already using qemu-bridge-helper to attach tap interface to a bridge but (unlike the bridge backend) it always uses the default bridge name - br0. This adds a "br" property support to the tap backend. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Greg Kurz <groug@kaod.org> Tested-by: Greg Kurz <groug@kaod.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/tap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tap.c b/net/tap.c
index 6abb962efd..b6896a7b7c 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -857,7 +857,9 @@ free_fail:
return -1;
}
- fd = net_bridge_run_helper(tap->helper, DEFAULT_BRIDGE_INTERFACE,
+ fd = net_bridge_run_helper(tap->helper,
+ tap->has_br ?
+ tap->br : DEFAULT_BRIDGE_INTERFACE,
errp);
if (fd == -1) {
return -1;