From ab26159de2d1a0dbcf4a94e5303a999113e0647d Mon Sep 17 00:00:00 2001 From: Quentin Armitage Date: Tue, 10 Nov 2015 07:48:41 +0000 Subject: Remove nat_mask configuration parameter nat_mask was only valid with 2.2 kernel, and the implementation of it was removed in patch d51194f... but some of the configuration code remained. This patch removes all remaining code relating to nat_mask. Signed-off-by: Quentin Armitage (cherry picked from commit a21be2e100a66c9db7801ea9c31c53e5abb110ae) --- doc/samples/keepalived.conf.misc_check | 1 - doc/samples/keepalived.conf.misc_check_arg | 1 - doc/samples/keepalived.conf.vrrp.lvs_syncd | 1 - keepalived/check/check_parser.c | 7 ------- keepalived/etc/keepalived/keepalived.conf | 2 -- keepalived/include/check_data.h | 2 -- 6 files changed, 14 deletions(-) diff --git a/doc/samples/keepalived.conf.misc_check b/doc/samples/keepalived.conf.misc_check index e41f6b2..1c195bc 100644 --- a/doc/samples/keepalived.conf.misc_check +++ b/doc/samples/keepalived.conf.misc_check @@ -14,7 +14,6 @@ virtual_server 10.10.10.2 1358 { delay_loop 6 lb_algo rr lb_kind NAT - nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP diff --git a/doc/samples/keepalived.conf.misc_check_arg b/doc/samples/keepalived.conf.misc_check_arg index e27092e..6b7d304 100644 --- a/doc/samples/keepalived.conf.misc_check_arg +++ b/doc/samples/keepalived.conf.misc_check_arg @@ -14,7 +14,6 @@ virtual_server 10.10.10.2 1358 { delay_loop 6 lb_algo rr lb_kind NAT - nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP diff --git a/doc/samples/keepalived.conf.vrrp.lvs_syncd b/doc/samples/keepalived.conf.vrrp.lvs_syncd index 0b12607..cdf7c49 100644 --- a/doc/samples/keepalived.conf.vrrp.lvs_syncd +++ b/doc/samples/keepalived.conf.vrrp.lvs_syncd @@ -51,7 +51,6 @@ virtual_server 192.168.200.19 80 { delay_loop 20 lb_algo rr lb_kind NAT - nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP diff --git a/keepalived/check/check_parser.c b/keepalived/check/check_parser.c index cc270ab..e9af9ed 100644 --- a/keepalived/check/check_parser.c +++ b/keepalived/check/check_parser.c @@ -110,12 +110,6 @@ lbkind_handler(vector_t *strvec) log_message(LOG_INFO, "PARSER : unknown [%s] routing method.", str); } static void -natmask_handler(vector_t *strvec) -{ - virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs); - inet_ston(vector_slot(strvec, 1), &vs->nat_mask); -} -static void pto_handler(vector_t *strvec) { virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs); @@ -304,7 +298,6 @@ check_init_keywords(void) install_keyword("lvs_sched", &lbalgo_handler); install_keyword("lb_kind", &lbkind_handler); install_keyword("lvs_method", &lbkind_handler); - install_keyword("nat_mask", &natmask_handler); install_keyword("persistence_timeout", &pto_handler); install_keyword("persistence_granularity", &pgr_handler); install_keyword("protocol", &proto_handler); diff --git a/keepalived/etc/keepalived/keepalived.conf b/keepalived/etc/keepalived/keepalived.conf index 4c11472..e7447ba 100644 --- a/keepalived/etc/keepalived/keepalived.conf +++ b/keepalived/etc/keepalived/keepalived.conf @@ -33,7 +33,6 @@ virtual_server 192.168.200.100 443 { delay_loop 6 lb_algo rr lb_kind NAT - nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP @@ -107,7 +106,6 @@ virtual_server 10.10.10.3 1358 { delay_loop 3 lb_algo rr lb_kind NAT - nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP diff --git a/keepalived/include/check_data.h b/keepalived/include/check_data.h index c795f67..4ce4a01 100644 --- a/keepalived/include/check_data.h +++ b/keepalived/include/check_data.h @@ -123,7 +123,6 @@ typedef struct _virtual_server { char sched[SCHED_MAX_LENGTH]; char timeout_persistence[MAX_TIMEOUT_LENGTH]; unsigned loadbalancing_kind; - uint32_t nat_mask; uint32_t granularity_persistence; char *virtualhost; list rs; @@ -219,7 +218,6 @@ static inline int inaddr_equal(sa_family_t family, void *addr1, void *addr2) (X)->vfwmark == (Y)->vfwmark &&\ (X)->service_type == (Y)->service_type &&\ (X)->loadbalancing_kind == (Y)->loadbalancing_kind &&\ - (X)->nat_mask == (Y)->nat_mask &&\ (X)->granularity_persistence == (Y)->granularity_persistence &&\ ( (!(X)->quorum_up && !(Y)->quorum_up) || \ ((X)->quorum_up && (Y)->quorum_up && !strcmp ((X)->quorum_up, (Y)->quorum_up)) \ -- 1.7.12.1