Commit 48148938 authored by Julius Volz's avatar Julius Volz Committed by David S. Miller

IPVS: Remove supports_ipv6 scheduler flag

Remove the 'supports_ipv6' scheduler flag since all schedulers now
support IPv6.
Signed-off-by: default avatarJulius Volz <julius.volz@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 44548375
...@@ -503,9 +503,6 @@ struct ip_vs_scheduler { ...@@ -503,9 +503,6 @@ struct ip_vs_scheduler {
char *name; /* scheduler name */ char *name; /* scheduler name */
atomic_t refcnt; /* reference counter */ atomic_t refcnt; /* reference counter */
struct module *module; /* THIS_MODULE/NULL */ struct module *module; /* THIS_MODULE/NULL */
#ifdef CONFIG_IP_VS_IPV6
int supports_ipv6; /* scheduler has IPv6 support */
#endif
/* scheduler initializing service */ /* scheduler initializing service */
int (*init_service)(struct ip_vs_service *svc); int (*init_service)(struct ip_vs_service *svc);
......
...@@ -1168,16 +1168,10 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u, ...@@ -1168,16 +1168,10 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
} }
#ifdef CONFIG_IP_VS_IPV6 #ifdef CONFIG_IP_VS_IPV6
if (u->af == AF_INET6) { if (u->af == AF_INET6 && (u->netmask < 1 || u->netmask > 128)) {
if (!sched->supports_ipv6) {
ret = -EAFNOSUPPORT;
goto out_err;
}
if ((u->netmask < 1) || (u->netmask > 128)) {
ret = -EINVAL; ret = -EINVAL;
goto out_err; goto out_err;
} }
}
#endif #endif
svc = kzalloc(sizeof(struct ip_vs_service), GFP_ATOMIC); svc = kzalloc(sizeof(struct ip_vs_service), GFP_ATOMIC);
...@@ -1272,16 +1266,10 @@ ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u) ...@@ -1272,16 +1266,10 @@ ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u)
old_sched = sched; old_sched = sched;
#ifdef CONFIG_IP_VS_IPV6 #ifdef CONFIG_IP_VS_IPV6
if (u->af == AF_INET6) { if (u->af == AF_INET6 && (u->netmask < 1 || u->netmask > 128)) {
if (!sched->supports_ipv6) {
ret = -EAFNOSUPPORT;
goto out;
}
if ((u->netmask < 1) || (u->netmask > 128)) {
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
}
#endif #endif
write_lock_bh(&__ip_vs_svc_lock); write_lock_bh(&__ip_vs_svc_lock);
......
...@@ -243,9 +243,6 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler = ...@@ -243,9 +243,6 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_dh_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_dh_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.init_service = ip_vs_dh_init_svc, .init_service = ip_vs_dh_init_svc,
.done_service = ip_vs_dh_done_svc, .done_service = ip_vs_dh_done_svc,
.update_service = ip_vs_dh_update_svc, .update_service = ip_vs_dh_update_svc,
......
...@@ -534,9 +534,6 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler = ...@@ -534,9 +534,6 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.init_service = ip_vs_lblc_init_svc, .init_service = ip_vs_lblc_init_svc,
.done_service = ip_vs_lblc_done_svc, .done_service = ip_vs_lblc_done_svc,
.schedule = ip_vs_lblc_schedule, .schedule = ip_vs_lblc_schedule,
......
...@@ -735,9 +735,6 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler = ...@@ -735,9 +735,6 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.init_service = ip_vs_lblcr_init_svc, .init_service = ip_vs_lblcr_init_svc,
.done_service = ip_vs_lblcr_done_svc, .done_service = ip_vs_lblcr_done_svc,
.schedule = ip_vs_lblcr_schedule, .schedule = ip_vs_lblcr_schedule,
......
...@@ -81,9 +81,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = { ...@@ -81,9 +81,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = {
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.schedule = ip_vs_lc_schedule, .schedule = ip_vs_lc_schedule,
}; };
......
...@@ -116,9 +116,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler = ...@@ -116,9 +116,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.schedule = ip_vs_nq_schedule, .schedule = ip_vs_nq_schedule,
}; };
......
...@@ -89,9 +89,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = { ...@@ -89,9 +89,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = {
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.init_service = ip_vs_rr_init_svc, .init_service = ip_vs_rr_init_svc,
.update_service = ip_vs_rr_update_svc, .update_service = ip_vs_rr_update_svc,
.schedule = ip_vs_rr_schedule, .schedule = ip_vs_rr_schedule,
......
...@@ -118,9 +118,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler = ...@@ -118,9 +118,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.schedule = ip_vs_sed_schedule, .schedule = ip_vs_sed_schedule,
}; };
......
...@@ -240,9 +240,6 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler = ...@@ -240,9 +240,6 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_sh_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_sh_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.init_service = ip_vs_sh_init_svc, .init_service = ip_vs_sh_init_svc,
.done_service = ip_vs_sh_done_svc, .done_service = ip_vs_sh_done_svc,
.update_service = ip_vs_sh_update_svc, .update_service = ip_vs_sh_update_svc,
......
...@@ -106,9 +106,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler = ...@@ -106,9 +106,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler =
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.schedule = ip_vs_wlc_schedule, .schedule = ip_vs_wlc_schedule,
}; };
......
...@@ -213,9 +213,6 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = { ...@@ -213,9 +213,6 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = {
.refcnt = ATOMIC_INIT(0), .refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE, .module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_wrr_scheduler.n_list), .n_list = LIST_HEAD_INIT(ip_vs_wrr_scheduler.n_list),
#ifdef CONFIG_IP_VS_IPV6
.supports_ipv6 = 1,
#endif
.init_service = ip_vs_wrr_init_svc, .init_service = ip_vs_wrr_init_svc,
.done_service = ip_vs_wrr_done_svc, .done_service = ip_vs_wrr_done_svc,
.update_service = ip_vs_wrr_update_svc, .update_service = ip_vs_wrr_update_svc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment