contrib/package/olsrd-luci: disable icmp redirects on startup and re-enable on stop
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 7 May 2009 17:23:25 +0000 (17:23 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 7 May 2009 17:23:25 +0000 (17:23 +0000)
contrib/package/olsrd-luci/files/etc/init.d/olsrd

index d9e5a8d..f9d031a 100755 (executable)
@@ -527,6 +527,9 @@ start() {
                fi
        fi
 
                fi
        fi
 
+       ### disable icmp redirects
+       echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
+
        SYSTEM_HOSTNAME=
        SYSTEM_LAT=
        SYSTEM_LON=
        SYSTEM_HOSTNAME=
        SYSTEM_LAT=
        SYSTEM_LON=
@@ -567,6 +570,9 @@ start() {
 stop() {
        ### stop olsrd
        start-stop-daemon -q -p $PID -x $BIN -K
 stop() {
        ### stop olsrd
        start-stop-daemon -q -p $PID -x $BIN -K
+
+       ### re-enable icmp redirects
+       echo 1 > /proc/sys/net/ipv4/conf/all/send_redirects
 }
 
 restart() {
 }
 
 restart() {