6ebc0106ce
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
24 lines
409 B
Bash
Executable File
24 lines
409 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ ! -x /sbin/bridge ]
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$MODE" = "start" ] ; then
|
|
case "$IFACE" in
|
|
*.[0-9]*)
|
|
VLANID="${IFACE##*.}"
|
|
IF_VLAN_RAW_DEVICE="${IFACE%.*}"
|
|
;;
|
|
esac
|
|
|
|
if [ -n "$IF_VLAN_RAW_DEVICE" ]; then
|
|
if [ -e "/sys/class/net/$IF_VLAN_RAW_DEVICE/bridge/vlan_filtering" ]; then
|
|
bridge vlan add dev $IF_VLAN_RAW_DEVICE vid $VLANID self
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
|