summaryrefslogtreecommitdiffstats
path: root/ctdb/config
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-05-14 08:55:05 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-05-14 08:55:05 +1000
commitbe7137faa99bc21146b6ae18fd98e0fb1aa88166 (patch)
tree749530ba694f0e89583ed4ac61621e1997a16887 /ctdb/config
parent016b37f1e22cadae98114856a15edf0388271692 (diff)
downloadsamba-be7137faa99bc21146b6ae18fd98e0fb1aa88166.tar.gz
samba-be7137faa99bc21146b6ae18fd98e0fb1aa88166.tar.xz
samba-be7137faa99bc21146b6ae18fd98e0fb1aa88166.zip
use scope host when adding the interface to loopback so we dont respond to ARPs for this ip
(This used to be ctdb commit fcd6226a6c00cf657532aa76804bfe029df21ba6)
Diffstat (limited to 'ctdb/config')
-rw-r--r--ctdb/config/events.d/11.natgw9
1 files changed, 8 insertions, 1 deletions
diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw
index 3da60d898b..8a71c86be9 100644
--- a/ctdb/config/events.d/11.natgw
+++ b/ctdb/config/events.d/11.natgw
@@ -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