ctdb-scripts: Make 10.interface IPv6-safe
authorMartin Schwenke <martin@meltin.net>
Fri, 21 Nov 2014 03:46:00 +0000 (14:46 +1100)
committerMartin Schwenke <martins@samba.org>
Fri, 5 Dec 2014 20:02:40 +0000 (21:02 +0100)
commit6471541d6d2bc9f2af0ff92b280abbd1d933cf88
tree17f8f97c8a4d292b3e9df64bd9bad13aa7260509
parentc314ae0b2af4a902cdd003ec6d663fe5b62b003b
ctdb-scripts: Make 10.interface IPv6-safe

Add checking to "releaseip" and "updateip" to ensure that the given IP
address is really on the given interface with the given netmask.  If
reality doesn't match the given arguments then believe reality.

Use new function iptables_wrapper() instead of calling iptables()
directly.

Use new function flush_route_cache() instead of doing IPv4-specific
/proc magic.

Remove setting of otherwise unused variable "failed".

Fix a test for which the error message has changed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/10.interface
ctdb/config/functions
ctdb/tests/eventscripts/10.interface.releaseip.002.sh