IPVS: Remove supports_ipv6 scheduler flag
authorJulius Volz <julius.volz@gmail.com>
Tue, 4 Nov 2008 01:08:56 +0000 (17:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Nov 2008 01:08:56 +0000 (17:08 -0800)
Remove the 'supports_ipv6' scheduler flag since all schedulers now
support IPv6.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 files changed:
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_dh.c
net/netfilter/ipvs/ip_vs_lblc.c
net/netfilter/ipvs/ip_vs_lblcr.c
net/netfilter/ipvs/ip_vs_lc.c
net/netfilter/ipvs/ip_vs_nq.c
net/netfilter/ipvs/ip_vs_rr.c
net/netfilter/ipvs/ip_vs_sed.c
net/netfilter/ipvs/ip_vs_sh.c
net/netfilter/ipvs/ip_vs_wlc.c
net/netfilter/ipvs/ip_vs_wrr.c

index fc63353779f0ef6521f502113e4a7d4b407f93ff..8f6abf4883e3008a77b92fbf0c778582bd242b02 100644 (file)
@@ -503,9 +503,6 @@ struct ip_vs_scheduler {
        char                    *name;          /* scheduler name */
        atomic_t                refcnt;         /* reference counter */
        struct module           *module;        /* THIS_MODULE/NULL */
-#ifdef CONFIG_IP_VS_IPV6
-       int                     supports_ipv6;  /* scheduler has IPv6 support */
-#endif
 
        /* scheduler initializing service */
        int (*init_service)(struct ip_vs_service *svc);
index 98e0a65646a1f349c2564d32323cfc18b23cf922..d0ccdaff4276ae278927f07f9bdc99380f78060c 100644 (file)
@@ -1168,15 +1168,9 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
        }
 
 #ifdef CONFIG_IP_VS_IPV6
-       if (u->af == AF_INET6) {
-               if (!sched->supports_ipv6) {
-                       ret = -EAFNOSUPPORT;
-                       goto out_err;
-               }
-               if ((u->netmask < 1) || (u->netmask > 128)) {
-                       ret = -EINVAL;
-                       goto out_err;
-               }
+       if (u->af == AF_INET6 && (u->netmask < 1 || u->netmask > 128)) {
+               ret = -EINVAL;
+               goto out_err;
        }
 #endif
 
@@ -1272,15 +1266,9 @@ ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u)
        old_sched = sched;
 
 #ifdef CONFIG_IP_VS_IPV6
-       if (u->af == AF_INET6) {
-               if (!sched->supports_ipv6) {
-                       ret = -EAFNOSUPPORT;
-                       goto out;
-               }
-               if ((u->netmask < 1) || (u->netmask > 128)) {
-                       ret = -EINVAL;
-                       goto out;
-               }
+       if (u->af == AF_INET6 && (u->netmask < 1 || u->netmask > 128)) {
+               ret = -EINVAL;
+               goto out;
        }
 #endif
 
index d8258e0cb58c333f0565b20b4b6d3e4eaaab05a1..a9dac74bb13f7550a4aa9c6b95a84566d4e1fd68 100644 (file)
@@ -243,9 +243,6 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
        .done_service =         ip_vs_dh_done_svc,
        .update_service =       ip_vs_dh_update_svc,
index 135a59454f1fd223d01f6314373a15204479bab7..4256cfad8d3137a26408c1b8c7a90ea49c1c6f2e 100644 (file)
@@ -534,9 +534,6 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
        .done_service =         ip_vs_lblc_done_svc,
        .schedule =             ip_vs_lblc_schedule,
index 4d6534a71b8ff817464a1bfecdb4e1d663e0148b..321b49fa41d8d1987e654da45a462a26c1c487f3 100644 (file)
@@ -735,9 +735,6 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
        .done_service =         ip_vs_lblcr_done_svc,
        .schedule =             ip_vs_lblcr_schedule,
index b69f808ac461215f0f07be0556e355e4b5e27707..51912cab777bb5349012709639c1efa1ff774005 100644 (file)
@@ -81,9 +81,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = {
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
 };
 
index 9a2d8033f08f1f2b0d8707d3650361f231d3500a..6758ad2ceaaf66130f881ff672cc0d9444d1416a 100644 (file)
@@ -116,9 +116,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
 };
 
index a22195f68ac4cf102b536be9d1a40354eab76723..8fb51c169eb852daeb9e1117fde96f07a9d2b595 100644 (file)
@@ -89,9 +89,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = {
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
        .update_service =       ip_vs_rr_update_svc,
        .schedule =             ip_vs_rr_schedule,
index 7d2f22f04b8389f2cd2f1ba8b20f72e49e7f511f..691a6a0086e18c90f2b0548951b1218fc9a4958f 100644 (file)
@@ -118,9 +118,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
 };
 
index 4074ccf492085ab21faa8339efbc1db6058ff180..0e53955ef1396ec0d157163eb66ab00f2e590506 100644 (file)
@@ -240,9 +240,6 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
        .done_service =         ip_vs_sh_done_svc,
        .update_service =       ip_vs_sh_update_svc,
index 8c596e712599fd12ff4b03edceae590d22226325..57b452bbb4eab71f106e5e56f23259b3df7b18d8 100644 (file)
@@ -106,9 +106,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler =
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
 };
 
index 7ea92fed50bf86c21ec75abfa779d9db1bf3d71f..2f618dc29c5b69468b21ded446b13f18c1efebab 100644 (file)
@@ -213,9 +213,6 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = {
        .refcnt =               ATOMIC_INIT(0),
        .module =               THIS_MODULE,
        .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,
        .done_service =         ip_vs_wrr_done_svc,
        .update_service =       ip_vs_wrr_update_svc,