Commit 191ec7ac authored by Dietmar Maurer's avatar Dietmar Maurer

bridgevlan: avoid bash regex

parent 16145cba
...@@ -38,16 +38,20 @@ do ...@@ -38,16 +38,20 @@ do
for port in $i for port in $i
do do
if [ "$MODE" = "start" ] && [ -d /sys/class/net/$IFACE/brif/$port ]; then if [ "$MODE" = "start" ] && [ -d /sys/class/net/$IFACE/brif/$port ]; then
#we allow vlan to pass through attached interface case "$port" in
if [[ $port =~ ^(eth|bond|wlan)[0-9]{1,2}$ ]] *.[0-9]*)
then # do nothing
if [ -n "$IF_BRIDGE_VIDS" ] ;;
then *)
bridge vlan add dev $port vid $IF_BRIDGE_VIDS # we allow vlan to pass through attached interface
else if [ -n "$IF_BRIDGE_VIDS" ]
bridge vlan add dev $port vid 2-4094 then
fi bridge vlan add dev $port vid $IF_BRIDGE_VIDS
fi else
bridge vlan add dev $port vid 2-4094
fi
;;
esac
fi fi
done done
done done
......
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