pve-manager/network-hooks/bridgevlanport
Thomas Lamprecht 6ebc0106ce cleanup: add network-hooks directory and move respective files
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-20 13:04:51 +02:00

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