ctdb-scripts: Make 10.interface IPv6-safe
commitcd260590e0beb17bf70a82b198661911ca63365e
authorMartin Schwenke <martin@meltin.net>
Fri, 21 Nov 2014 03:46:00 +0000 (21 14:46 +1100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Dec 2014 19:56:09 +0000 (10 20:56 +0100)
treefac29be2f7d4bd0b7621bd2d48365b7436bba57a
parent231fab1886bead4c952e8300a22361c0a3378031
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>
(cherry picked from commit 6471541d6d2bc9f2af0ff92b280abbd1d933cf88)
ctdb/config/events.d/10.interface
ctdb/config/functions
ctdb/tests/eventscripts/10.interface.releaseip.002.sh