Statistics
| Branch: | Tag: | Revision:

root / vlans / if-down.d / vmrouter @ cf51ea5b

History | View | Annotate | Download (433 Bytes)

1
#!/bin/bash
2

    
3
if [ ! -n "$IF_IP_ROUTING_TABLE" ]; then
4
	# bail out early if there's no ip-routing-table defined
5
	exit 0
6
fi
7

    
8
if [ "$ADDRFAM" = "inet" ]; then
9
	IP="ip"
10
elif [ "$ADDRFAM" = "inet6" ]; then
11
	IP="ip -6"
12
else
13
	exit 0
14
fi
15

    
16
while $IP rule del iif $IFACE;do :; done 2>/dev/null
17

    
18
if [ "$ADDRFAM" = "inet" ]; then
19
	if [ -n "$IF_ARP_IP" ]; then
20
		arptables -D OUTPUT -o $IFACE --opcode request -j mangle 2>/dev/null || true
21
	fi
22
fi