diff options
-rw-r--r-- | include/net/ip_vs.h | 6 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_app.c | 10 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_core.c | 29 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_est.c | 9 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 9 |
5 files changed, 4 insertions, 59 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 1b0985fca1e2..b1370c4015b6 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -1117,8 +1117,6 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc); | |||
1117 | 1117 | ||
1118 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); | 1118 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); |
1119 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); | 1119 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); |
1120 | extern int ip_vs_app_init(void); | ||
1121 | extern void ip_vs_app_cleanup(void); | ||
1122 | 1120 | ||
1123 | void ip_vs_bind_pe(struct ip_vs_service *svc, struct ip_vs_pe *pe); | 1121 | void ip_vs_bind_pe(struct ip_vs_service *svc, struct ip_vs_pe *pe); |
1124 | void ip_vs_unbind_pe(struct ip_vs_service *svc); | 1122 | void ip_vs_unbind_pe(struct ip_vs_service *svc); |
@@ -1221,15 +1219,11 @@ extern int start_sync_thread(struct net *net, int state, char *mcast_ifn, | |||
1221 | __u8 syncid); | 1219 | __u8 syncid); |
1222 | extern int stop_sync_thread(struct net *net, int state); | 1220 | extern int stop_sync_thread(struct net *net, int state); |
1223 | extern void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp); | 1221 | extern void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp); |
1224 | extern int ip_vs_sync_init(void); | ||
1225 | extern void ip_vs_sync_cleanup(void); | ||
1226 | 1222 | ||
1227 | 1223 | ||
1228 | /* | 1224 | /* |
1229 | * IPVS rate estimator prototypes (from ip_vs_est.c) | 1225 | * IPVS rate estimator prototypes (from ip_vs_est.c) |
1230 | */ | 1226 | */ |
1231 | extern int ip_vs_estimator_init(void); | ||
1232 | extern void ip_vs_estimator_cleanup(void); | ||
1233 | extern void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats); | 1227 | extern void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats); |
1234 | extern void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats); | 1228 | extern void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats); |
1235 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); | 1229 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); |
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index e223fb749ddf..fe6cb4304d72 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c | |||
@@ -589,13 +589,3 @@ void __net_exit ip_vs_app_net_cleanup(struct net *net) | |||
589 | { | 589 | { |
590 | proc_net_remove(net, "ip_vs_app"); | 590 | proc_net_remove(net, "ip_vs_app"); |
591 | } | 591 | } |
592 | |||
593 | int __init ip_vs_app_init(void) | ||
594 | { | ||
595 | return 0; | ||
596 | } | ||
597 | |||
598 | |||
599 | void ip_vs_app_cleanup(void) | ||
600 | { | ||
601 | } | ||
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 6cefe322b044..2200bae1d4dd 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c | |||
@@ -1967,36 +1967,23 @@ static int __init ip_vs_init(void) | |||
1967 | { | 1967 | { |
1968 | int ret; | 1968 | int ret; |
1969 | 1969 | ||
1970 | ip_vs_estimator_init(); | ||
1971 | ret = ip_vs_control_init(); | 1970 | ret = ip_vs_control_init(); |
1972 | if (ret < 0) { | 1971 | if (ret < 0) { |
1973 | pr_err("can't setup control.\n"); | 1972 | pr_err("can't setup control.\n"); |
1974 | goto cleanup_estimator; | 1973 | goto exit; |
1975 | } | 1974 | } |
1976 | 1975 | ||
1977 | ip_vs_protocol_init(); | 1976 | ip_vs_protocol_init(); |
1978 | 1977 | ||
1979 | ret = ip_vs_app_init(); | ||
1980 | if (ret < 0) { | ||
1981 | pr_err("can't setup application helper.\n"); | ||
1982 | goto cleanup_protocol; | ||
1983 | } | ||
1984 | |||
1985 | ret = ip_vs_conn_init(); | 1978 | ret = ip_vs_conn_init(); |
1986 | if (ret < 0) { | 1979 | if (ret < 0) { |
1987 | pr_err("can't setup connection table.\n"); | 1980 | pr_err("can't setup connection table.\n"); |
1988 | goto cleanup_app; | 1981 | goto cleanup_protocol; |
1989 | } | ||
1990 | |||
1991 | ret = ip_vs_sync_init(); | ||
1992 | if (ret < 0) { | ||
1993 | pr_err("can't setup sync data.\n"); | ||
1994 | goto cleanup_conn; | ||
1995 | } | 1982 | } |
1996 | 1983 | ||
1997 | ret = register_pernet_subsys(&ipvs_core_ops); /* Alloc ip_vs struct */ | 1984 | ret = register_pernet_subsys(&ipvs_core_ops); /* Alloc ip_vs struct */ |
1998 | if (ret < 0) | 1985 | if (ret < 0) |
1999 | goto cleanup_sync; | 1986 | goto cleanup_conn; |
2000 | 1987 | ||
2001 | ret = register_pernet_device(&ipvs_core_dev_ops); | 1988 | ret = register_pernet_device(&ipvs_core_dev_ops); |
2002 | if (ret < 0) | 1989 | if (ret < 0) |
@@ -2016,17 +2003,12 @@ cleanup_dev: | |||
2016 | unregister_pernet_device(&ipvs_core_dev_ops); | 2003 | unregister_pernet_device(&ipvs_core_dev_ops); |
2017 | cleanup_sub: | 2004 | cleanup_sub: |
2018 | unregister_pernet_subsys(&ipvs_core_ops); | 2005 | unregister_pernet_subsys(&ipvs_core_ops); |
2019 | cleanup_sync: | ||
2020 | ip_vs_sync_cleanup(); | ||
2021 | cleanup_conn: | 2006 | cleanup_conn: |
2022 | ip_vs_conn_cleanup(); | 2007 | ip_vs_conn_cleanup(); |
2023 | cleanup_app: | ||
2024 | ip_vs_app_cleanup(); | ||
2025 | cleanup_protocol: | 2008 | cleanup_protocol: |
2026 | ip_vs_protocol_cleanup(); | 2009 | ip_vs_protocol_cleanup(); |
2027 | ip_vs_control_cleanup(); | 2010 | ip_vs_control_cleanup(); |
2028 | cleanup_estimator: | 2011 | exit: |
2029 | ip_vs_estimator_cleanup(); | ||
2030 | return ret; | 2012 | return ret; |
2031 | } | 2013 | } |
2032 | 2014 | ||
@@ -2035,12 +2017,9 @@ static void __exit ip_vs_cleanup(void) | |||
2035 | nf_unregister_hooks(ip_vs_ops, ARRAY_SIZE(ip_vs_ops)); | 2017 | nf_unregister_hooks(ip_vs_ops, ARRAY_SIZE(ip_vs_ops)); |
2036 | unregister_pernet_device(&ipvs_core_dev_ops); | 2018 | unregister_pernet_device(&ipvs_core_dev_ops); |
2037 | unregister_pernet_subsys(&ipvs_core_ops); /* free ip_vs struct */ | 2019 | unregister_pernet_subsys(&ipvs_core_ops); /* free ip_vs struct */ |
2038 | ip_vs_sync_cleanup(); | ||
2039 | ip_vs_conn_cleanup(); | 2020 | ip_vs_conn_cleanup(); |
2040 | ip_vs_app_cleanup(); | ||
2041 | ip_vs_protocol_cleanup(); | 2021 | ip_vs_protocol_cleanup(); |
2042 | ip_vs_control_cleanup(); | 2022 | ip_vs_control_cleanup(); |
2043 | ip_vs_estimator_cleanup(); | ||
2044 | pr_info("ipvs unloaded.\n"); | 2023 | pr_info("ipvs unloaded.\n"); |
2045 | } | 2024 | } |
2046 | 2025 | ||
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c index f5d2a01d69d4..0fac6017b6fb 100644 --- a/net/netfilter/ipvs/ip_vs_est.c +++ b/net/netfilter/ipvs/ip_vs_est.c | |||
@@ -207,12 +207,3 @@ void __net_exit ip_vs_estimator_net_cleanup(struct net *net) | |||
207 | { | 207 | { |
208 | del_timer_sync(&net_ipvs(net)->est_timer); | 208 | del_timer_sync(&net_ipvs(net)->est_timer); |
209 | } | 209 | } |
210 | |||
211 | int __init ip_vs_estimator_init(void) | ||
212 | { | ||
213 | return 0; | ||
214 | } | ||
215 | |||
216 | void ip_vs_estimator_cleanup(void) | ||
217 | { | ||
218 | } | ||
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index 58bfabbe7446..7ee7215b8ba0 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -1689,12 +1689,3 @@ void ip_vs_sync_net_cleanup(struct net *net) | |||
1689 | if (retc && retc != -ESRCH) | 1689 | if (retc && retc != -ESRCH) |
1690 | pr_err("Failed to stop Backup Daemon\n"); | 1690 | pr_err("Failed to stop Backup Daemon\n"); |
1691 | } | 1691 | } |
1692 | |||
1693 | int __init ip_vs_sync_init(void) | ||
1694 | { | ||
1695 | return 0; | ||
1696 | } | ||
1697 | |||
1698 | void ip_vs_sync_cleanup(void) | ||
1699 | { | ||
1700 | } | ||