summaryrefslogtreecommitdiff
path: root/scripts/vyatta-link-detect
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 16:37:00 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 16:37:00 -0700
commitb03c9ae8a6741d0f5d0f46e396c7023174d6f626 (patch)
treee8c3675ff5838bbd7b2ade01501969cf6a99db23 /scripts/vyatta-link-detect
parent25a4bbc5569acf468ca2dc49c22751af16763b70 (diff)
downloadvyatta-cfg-quagga-b03c9ae8a6741d0f5d0f46e396c7023174d6f626.tar.gz
vyatta-cfg-quagga-b03c9ae8a6741d0f5d0f46e396c7023174d6f626.zip
Enable link filtering
Bug 4061 Enable new kernel link_filter for IPV4 and IPV6
Diffstat (limited to 'scripts/vyatta-link-detect')
-rwxr-xr-xscripts/vyatta-link-detect8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vyatta-link-detect b/scripts/vyatta-link-detect
index 8981d7f4..66f444d3 100755
--- a/scripts/vyatta-link-detect
+++ b/scripts/vyatta-link-detect
@@ -13,8 +13,12 @@ if [ $# -ne 2 ]; then
fi
case $2 in
-on) cmd="link-detect" ;;
-off) cmd="no link-detect" ;;
+on) sysctl -w "net.ipv4.conf.$1.link_filter=2"
+ sysctl -w "net.ipv6.conf.$1.link_filter=2"
+ cmd="link-detect" ;;
+off) sysctl -w "net.ipv4.conf.$1.link_filter=1"
+ sysctl -w "net.ipv6.conf.$1.link_filter=1"
+ cmd="no link-detect" ;;
*) usage;;
esac