diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-04-28 08:46:41 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-04-28 08:51:06 +1000 |
commit | d6ae1c417319d11c72b8b16b1bd1864ce0492068 (patch) | |
tree | 2fbbc55be63c8fc5c03f910531277526425a00fb /ctdb/config/events.d | |
parent | 8571fef9d240beaaab258b23626865585fbb9389 (diff) | |
download | samba-d6ae1c417319d11c72b8b16b1bd1864ce0492068.tar.gz samba-d6ae1c417319d11c72b8b16b1bd1864ce0492068.tar.xz samba-d6ae1c417319d11c72b8b16b1bd1864ce0492068.zip |
If the admin makes a configuration mistake and configures NATGW to use the
same ip address as a normal public-address,
check for this in the natgw script and warn the user.
Also prevent ctdb from starting up since this configuration will not work.
BZ60933
(This used to be ctdb commit 480af69b63b9162c85d8e04461ca9e4a083c04a4)
Diffstat (limited to 'ctdb/config/events.d')
-rw-r--r-- | ctdb/config/events.d/11.natgw | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index b226b8110b..e6e54f48dc 100644 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -27,6 +27,15 @@ delete_all() { case "$1" in startup) + [ -z "$CTDB_PUBLIC_ADDRESSES" ] && { + CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses + } + egrep "^$CTDB_NATGW_PUBLIC_IP[ \t]" $CTDB_PUBLIC_ADDRESSES >/dev/null + [ "$?" = "0" ] && { + echo ERROR: NATGW configured to use a public address. NATGW must not use a public address. + exit 1 + } + # 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 |