67 lines
2.3 KiB
Diff
67 lines
2.3 KiB
Diff
|
From 34b46b172857babbb2bca5e012c7827ed6a26b01 Mon Sep 17 00:00:00 2001
|
||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||
|
Date: Wed, 6 Nov 2019 10:00:31 +0100
|
||
|
Subject: [PATCH] IPaddr2: add noprefixroute parameter
|
||
|
|
||
|
---
|
||
|
heartbeat/IPaddr2 | 17 ++++++++++++++++-
|
||
|
1 file changed, 16 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||
|
index 1d39ae514..6f8e8c734 100755
|
||
|
--- a/heartbeat/IPaddr2
|
||
|
+++ b/heartbeat/IPaddr2
|
||
|
@@ -88,6 +88,7 @@ OCF_RESKEY_arp_sender_default=""
|
||
|
OCF_RESKEY_send_arp_opts_default=""
|
||
|
OCF_RESKEY_flush_routes_default="false"
|
||
|
OCF_RESKEY_run_arping_default=false
|
||
|
+OCF_RESKEY_noprefixroute_default="false"
|
||
|
OCF_RESKEY_preferred_lft_default="forever"
|
||
|
OCF_RESKEY_network_namespace_default=""
|
||
|
|
||
|
@@ -109,6 +110,7 @@ OCF_RESKEY_network_namespace_default=""
|
||
|
: ${OCF_RESKEY_send_arp_opts=${OCF_RESKEY_send_arp_opts_default}}
|
||
|
: ${OCF_RESKEY_flush_routes=${OCF_RESKEY_flush_routes_default}}
|
||
|
: ${OCF_RESKEY_run_arping=${OCF_RESKEY_run_arping_default}}
|
||
|
+: ${OCF_RESKEY_noprefixroute=${OCF_RESKEY_noprefixroute_default}}
|
||
|
: ${OCF_RESKEY_preferred_lft=${OCF_RESKEY_preferred_lft_default}}
|
||
|
: ${OCF_RESKEY_network_namespace=${OCF_RESKEY_network_namespace_default}}
|
||
|
|
||
|
@@ -377,6 +379,14 @@ Whether or not to run arping for IPv4 collision detection check.
|
||
|
<content type="string" default="${OCF_RESKEY_run_arping_default}"/>
|
||
|
</parameter>
|
||
|
|
||
|
+<parameter name="noprefixroute">
|
||
|
+<longdesc lang="en">
|
||
|
+Use noprefixroute flag (see 'man ip-address').
|
||
|
+</longdesc>
|
||
|
+<shortdesc lang="en">Use noprefixroute flag</shortdesc>
|
||
|
+<content type="string" default="${OCF_RESKEY_noprefixroute_default}"/>
|
||
|
+</parameter>
|
||
|
+
|
||
|
<parameter name="preferred_lft">
|
||
|
<longdesc lang="en">
|
||
|
For IPv6, set the preferred lifetime of the IP address.
|
||
|
@@ -397,8 +407,8 @@ the namespace.
|
||
|
<shortdesc lang="en">Network namespace to use</shortdesc>
|
||
|
<content type="string" default="${OCF_RESKEY_network_namespace_default}"/>
|
||
|
</parameter>
|
||
|
-
|
||
|
</parameters>
|
||
|
+
|
||
|
<actions>
|
||
|
<action name="start" timeout="20s" />
|
||
|
<action name="stop" timeout="20s" />
|
||
|
@@ -640,6 +650,11 @@ add_interface () {
|
||
|
msg="Adding $FAMILY address $ipaddr/$netmask with broadcast address $broadcast to device $iface"
|
||
|
fi
|
||
|
|
||
|
+ if ocf_is_true "${OCF_RESKEY_noprefixroute}"; then
|
||
|
+ cmd="$cmd noprefixroute"
|
||
|
+ msg="${msg} (with noprefixroute)"
|
||
|
+ fi
|
||
|
+
|
||
|
if [ ! -z "$label" ]; then
|
||
|
cmd="$cmd label $label"
|
||
|
msg="${msg} (with label $label)"
|