if [ -n "$MACVLAN_DEV" -a -n "$MACVLAN_MACADDR" ]; then
ip link del link ${MACVLAN_DEV} ${DEVICE} type macvlan > /dev/null 2>&1
- ip link add link ${MACVLAN_DEV} address ${MACVLAN_MACADDR} name ${DEVICE} type macvlan
+ ip link add link ${MACVLAN_DEV} address ${MACVLAN_MACADDR} name ${DEVICE} type macvlan ${MACVLAN_MODE:+mode $MACVLAN_MODE}
fi
# is this device available? (this catches PCMCIA devices for us)
if macvlan
MACVLAN_DEV=<exitsting base interface eg. eth0>
MACVLAN_MACADDR=<desired hw address of new interface>
+ MACVLAN_MODE=<desired mode of new interface (private, vepa, bridge, passthru, source)>
fi