[pve-devel] [PATCH] add bridge_vlan option to brige in /etc/network/interface

Michael Rasmussen mir at datanom.net
Thu Jan 2 12:26:05 CET 2014


On Thu,  2 Jan 2014 08:42:09 +0100
Alexandre Derumier <aderumier at odiso.com> wrote:

> +bridge_parse_ports $INTERFACES | while read i
> +do
> +  for port in $i
> +  do
> +    if [ "$MODE" = "start" ] && [ -d /sys/class/net/$IFACE/brif/$port ]; then
> +      #we allow vlan to pass through attached interface
> +      if [ -n "$IF_BRIDGE_VLAN" ]
> +      then
> +	 case "$port" in
> +	   eth*|bond*|wlan*)
> +	     bridge vlan add dev $port vid $IF_BRIDGE_VLAN 
> +	   ;;
> +	 esac
> +      fi
> +    fi
> +  done
> +done
> +
Above should be replaced with this:
bridge_parse_ports $INTERFACES | while read i
do
  for port in $i
  do
    if [ "$MODE" = "start" ] && [ -d /sys/class/net/$IFACE/brif/$port
]; then 
      #we allow vlan to pass through attached interface
      if [ -n "$IF_BRIDGE_VLAN" ]
      then
	 if [[ $port =~ ^(eth|bond|wlan)[0-9]{1,2}$ ]]; then
	     bridge vlan add dev $port vid $IF_BRIDGE_VLAN
	 fi
      fi
    fi
  done
done


-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
The trouble with a lot of self-made men is that they worship their
creator.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20140102/5b4eef09/attachment.sig>


More information about the pve-devel mailing list