summaryrefslogtreecommitdiffstats
path: root/skripti/remove_ipv6_on_disconnect.sh
blob: a22768855af3faa66bdbf3677e129909a7c3f606 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
set -xe
tail --follow=name --retry /var/log/syslog | grep "default route via" | while read l
do
	iface=`cut -d\  -f6 <<<"$l" | sed s/://`
	ip -6 route | grep $iface | while read line
	do
		ip route del $line
	done
done