Blame SOURCES/bz1741042-IPaddr2-add-noprefixroute-parameter.patch

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