3 source /etc/default/snf-network
7 RT_TABLES=/etc/iproute2/rt_tables
11 ARP_IP=$(ipcalc $SUBNET | grep HostMax | awk '{print $2}')
15 if [ -n "$SUBNET" ]; then
16 arptables -D OUTPUT -o $VLAN --opcode request -j mangle --mangle-ip-s $ARP_IP
17 if [ -n "$GATEWAY" ]; then
18 ip route del default via $GATEWAY dev $VLAN table $TABLE
20 ip route del $SUBNET dev $VLAN table $TABLE
21 ip route del $SUBNET dev $VLAN table main
22 ip rule del iif $VLAN table $TABLE
25 if [ -n "$SUBNET6" ]; then
26 if [ -n "$GATEWAY6" ]; then
27 ip -6 route del default via $GATEWAY6 dev $VLAN table $TABLE
29 ip -6 route add $SUBNET6 dev $VLAN table $TABLE
30 ip -6 route add $SUBNET6 dev $VLAN table main
31 ip -6 rule add iif $VLAN table $TABLE
34 sed -i 's/.*'"$TABLE"'$//' $RT_TABLES