From abaa66252c1f90b148ed0cd0a8fca0b30798461c Mon Sep 17 00:00:00 2001 From: Dominik Epple Date: Mon, 29 Jan 2018 15:46:29 +0100 Subject: [PATCH] Minimal multi-bridge support To be used with a setting like tap=tap50=bridge0,tap51=bridge1 Bridge(s) need to be pre-created Documentation needs to be added. --- lib/ioh-setup | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/ioh-setup b/lib/ioh-setup index 9773e96..20f91be 100644 --- a/lib/ioh-setup +++ b/lib/ioh-setup @@ -172,9 +172,13 @@ __setup_bridge() { local lastbridge=$(echo $allbridges | tr ' ' '\n' | tail -n1 | cut -c7- ) for bridge in $allbridges; do - local bridgetest=$('ifconfig' $bridge | grep "member: $iface") - if [ -n "$bridgetest" ]; then - bridgeif=$bridge + if [ "$bridge" = "$iface" ]; then + bridgeif=$iface + else + local bridgetest=$('ifconfig' $bridge | grep "member: $iface") + if [ -n "$bridgetest" ]; then + bridgeif=$bridge + fi fi done