use scope host when adding the interface to loopback so we dont respond to ARPs for...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 13 May 2009 22:55:05 +0000 (08:55 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 13 May 2009 22:55:05 +0000 (08:55 +1000)
config/events.d/11.natgw

index 3da60d898bb5f2462a3a4a198cc922e5eff62212..8a71c86be9c1f7b9528d045ebddcce1a8564281d 100644 (file)
@@ -28,6 +28,13 @@ delete_all() {
 }
 
 case $cmd in 
+     startup)
+       # do not respond to ARPs that are for ip addresses with scope 'host'
+       echo 3 > /proc/sys/net/ipv4/conf/all/arp_ignore
+       # do not send out arp requests from loopback addresses
+       echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
+       ;;
+
      recovered)
        MYPNN=`ctdb pnn | cut -d: -f2`
        NATGWMASTER=`ctdb natgwlist | head -1`
@@ -50,7 +57,7 @@ case $cmd in
                # We do this so that the ip address will exist on a
                # non-loopback interface so that samba may send it along in the
                # KDC requests.
-               ip addr add $CTDB_NATGW_PUBLIC_IP_HOST dev lo
+               ip addr add $CTDB_NATGW_PUBLIC_IP_HOST dev lo scope host
                ip route add 0.0.0.0/0 via $NATGWIP metric 10
        fi