Blame SOURCES/bz1477587-exclude-mismatch-vips.patch

9cfb40
From f42914b07166db123b55a4acd31f4a6eb280d0f8 Mon Sep 17 00:00:00 2001
9cfb40
From: Ryan O'Hara <rohara@redhat.com>
9cfb40
Date: Mon, 11 Dec 2017 12:36:26 -0600
9cfb40
Subject: [PATCH] Exclude mixed family VIPs from VRRP advertisements
9cfb40
9cfb40
In previous releases of keepalived, it was allowed to have both IPv5
9cfb40
and IPv6 addresses in the 'virtual_ipaddress' block. The address count
9cfb40
in VRRP advertisements would reflect all VIPS, both IPv4 and IPv6, but
9cfb40
the address list would contain empty addresses for any VIP that did
9cfb40
not match the VRRP instance family. In VRRPv3 this is not allowed, and
9cfb40
recent releases will simply ignore any VIP that does not match the
9cfb40
instance family causing those VIPs to not be created in the interface.
9cfb40
9cfb40
Rather than ignore the VIP of mismatched family, this patch will move
9cfb40
non-matching VIP to the excluded list causing them to not be included
9cfb40
in the VRRP advertisements but still create them when in MASTER state.
9cfb40
---
9cfb40
 keepalived/vrrp/vrrp_parser.c | 3 ++-
9cfb40
 1 file changed, 2 insertions(+), 1 deletion(-)
9cfb40
9cfb40
diff --git a/keepalived/vrrp/vrrp_parser.c b/keepalived/vrrp/vrrp_parser.c
9cfb40
index 7a383153..d2cd720a 100644
9cfb40
--- a/keepalived/vrrp/vrrp_parser.c
9cfb40
+++ b/keepalived/vrrp/vrrp_parser.c
9cfb40
@@ -641,8 +641,9 @@ vrrp_vip_handler(__attribute__((unused)) vector_t *strvec)
9cfb40
 				if (vrrp->family == AF_UNSPEC)
9cfb40
 					vrrp->family = address_family;
9cfb40
 				else if (address_family != vrrp->family) {
9cfb40
-					log_message(LOG_INFO, "(%s): address family must match VRRP instance [%s] - ignoring", vrrp->iname, str);
9cfb40
+					log_message(LOG_WARNING, "(%s): address family does not match VRRP instance [%s]", vrrp->iname, str);
9cfb40
 					free_list_element(vrrp->vip, vrrp->vip->tail);
9cfb40
+					alloc_vrrp_evip(vec);
9cfb40
 				}
9cfb40
 			}
9cfb40
 
9cfb40
-- 
9cfb40
2.14.2
9cfb40