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