#Define some defaults
INET_VLAN=7
IPTV_VLAN=8
+ATM_DEV=0
eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
if [ "$RRDLOG" == "" ]; then
if [ "$TYPE" == "pppoeatm" ] || [ "$TYPE" == "pptpatm" ]; then
- PPP_NIC=nas0
- DEVICE=nas0
+ PPP_NIC=nas${ATM_DEV}
+ DEVICE=nas${ATM_DEV}
boot_mesg "Createing ATM-Bridge as $PPP_NIC ..."
- br2684ctl -c0 -e${ENCAP} -a0.${VPI}.${VCI} >/dev/null 2>&1 &
+ br2684ctl -c${ATM_DEV} -e${ENCAP} -a${ATM_DEV}.${VPI}.${VCI} >/dev/null 2>&1 &
sleep 1
+
+ # use user-defined or green mac address for nas0
+ if [ -n "$MAC" ]; then
+ ip link set dev nas${ATM_DEV} address ${MAC}
+ else
+ ip link set dev nas${ATM_DEV} address $(cat /sys/class/net/green0/address)
+ fi
+
if [ "$TYPE" == "pppoeatm" ]; then
TYPE="pppoe"
fi
### Standard PPP options we always use
#
PPP_STD_OPTIONS="$PLUGOPTS $DNS defaultroute noipdefault noauth"
- PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach mtu ${MTU}"
- PPP_STD_OPTIONS+=" mru ${MRU} noaccomp nodeflate nopcomp novj novjccomp"
+ PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach"
+ PPP_STD_OPTIONS+=" noaccomp nodeflate nopcomp novj novjccomp"
PPP_STD_OPTIONS+=" nobsdcomp user ${USERNAME} lcp-echo-interval 20"
PPP_STD_OPTIONS+=" lcp-echo-failure 5 ${AUTH}"
+
+ if [ -n "${MTU}" ]; then
+ PPP_STD_OPTIONS="${PPP_STD_OPTIONS} mtu ${MTU}"
+ fi
+
+ if [ -n "${MRU}" ]; then
+ PPP_STD_OPTIONS="${PPP_STD_OPTIONS} mru ${MRU}"
+ fi
### Debugging
#