aboutsummaryrefslogtreecommitdiffstats
path: root/main/vlan/mvlan.pre-up
diff options
context:
space:
mode:
Diffstat (limited to 'main/vlan/mvlan.pre-up')
-rw-r--r--main/vlan/mvlan.pre-up14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/vlan/mvlan.pre-up b/main/vlan/mvlan.pre-up
new file mode 100644
index 0000000000..6713f3115a
--- /dev/null
+++ b/main/vlan/mvlan.pre-up
@@ -0,0 +1,14 @@
+#!/bin/sh
+case "$IFACE" in
+ *#[0-9]*)
+ MVLANID="${IFACE##*#}"
+ IF_MVLAN_RAW_DEVICE="${IFACE%#*}"
+ ;;
+ *)
+ ;;
+esac
+if [ -n "$IF_MVLAN_RAW_DEVICE" ]
+then
+ # Kernel new style configuration
+ ip link add link $IF_MVLAN_RAW_DEVICE name $IFACE type macvlan
+fi