From 584613eacb3840c1803e665ed7edd4ac186deced Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Tue, 13 Sep 2016 17:11:54 +1000 Subject: 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 Reviewed-by: Greg Kurz Tested-by: Greg Kurz Signed-off-by: Jason Wang --- net/tap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net') 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; -- cgit v1.2.3