diff options
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 1aaf915656f3..873d5be7926c 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -425,9 +425,9 @@ struct ip_vs_protocol { | |||
425 | 425 | ||
426 | const char *(*state_name)(int state); | 426 | const char *(*state_name)(int state); |
427 | 427 | ||
428 | int (*state_transition)(struct ip_vs_conn *cp, int direction, | 428 | void (*state_transition)(struct ip_vs_conn *cp, int direction, |
429 | const struct sk_buff *skb, | 429 | const struct sk_buff *skb, |
430 | struct ip_vs_proto_data *pd); | 430 | struct ip_vs_proto_data *pd); |
431 | 431 | ||
432 | int (*register_app)(struct net *net, struct ip_vs_app *inc); | 432 | int (*register_app)(struct net *net, struct ip_vs_app *inc); |
433 | 433 | ||
@@ -900,6 +900,7 @@ struct netns_ipvs { | |||
900 | volatile int sync_state; | 900 | volatile int sync_state; |
901 | volatile int master_syncid; | 901 | volatile int master_syncid; |
902 | volatile int backup_syncid; | 902 | volatile int backup_syncid; |
903 | struct mutex sync_mutex; | ||
903 | /* multicast interface name */ | 904 | /* multicast interface name */ |
904 | char master_mcast_ifn[IP_VS_IFNAME_MAXLEN]; | 905 | char master_mcast_ifn[IP_VS_IFNAME_MAXLEN]; |
905 | char backup_mcast_ifn[IP_VS_IFNAME_MAXLEN]; | 906 | char backup_mcast_ifn[IP_VS_IFNAME_MAXLEN]; |
@@ -1125,17 +1126,16 @@ int unregister_ip_vs_pe(struct ip_vs_pe *pe); | |||
1125 | struct ip_vs_pe *ip_vs_pe_getbyname(const char *name); | 1126 | struct ip_vs_pe *ip_vs_pe_getbyname(const char *name); |
1126 | struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name); | 1127 | struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name); |
1127 | 1128 | ||
1128 | static inline void ip_vs_pe_get(const struct ip_vs_pe *pe) | 1129 | /* |
1129 | { | 1130 | * Use a #define to avoid all of module.h just for these trivial ops |
1130 | if (pe && pe->module) | 1131 | */ |
1132 | #define ip_vs_pe_get(pe) \ | ||
1133 | if (pe && pe->module) \ | ||
1131 | __module_get(pe->module); | 1134 | __module_get(pe->module); |
1132 | } | ||
1133 | 1135 | ||
1134 | static inline void ip_vs_pe_put(const struct ip_vs_pe *pe) | 1136 | #define ip_vs_pe_put(pe) \ |
1135 | { | 1137 | if (pe && pe->module) \ |
1136 | if (pe && pe->module) | ||
1137 | module_put(pe->module); | 1138 | module_put(pe->module); |
1138 | } | ||
1139 | 1139 | ||
1140 | /* | 1140 | /* |
1141 | * IPVS protocol functions (from ip_vs_proto.c) | 1141 | * IPVS protocol functions (from ip_vs_proto.c) |
@@ -1377,7 +1377,7 @@ static inline int ip_vs_conntrack_enabled(struct netns_ipvs *ipvs) | |||
1377 | 1377 | ||
1378 | extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, | 1378 | extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, |
1379 | int outin); | 1379 | int outin); |
1380 | extern int ip_vs_confirm_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp); | 1380 | extern int ip_vs_confirm_conntrack(struct sk_buff *skb); |
1381 | extern void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct, | 1381 | extern void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct, |
1382 | struct ip_vs_conn *cp, u_int8_t proto, | 1382 | struct ip_vs_conn *cp, u_int8_t proto, |
1383 | const __be16 port, int from_rs); | 1383 | const __be16 port, int from_rs); |
@@ -1395,8 +1395,7 @@ static inline void ip_vs_update_conntrack(struct sk_buff *skb, | |||
1395 | { | 1395 | { |
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | static inline int ip_vs_confirm_conntrack(struct sk_buff *skb, | 1398 | static inline int ip_vs_confirm_conntrack(struct sk_buff *skb) |
1399 | struct ip_vs_conn *cp) | ||
1400 | { | 1399 | { |
1401 | return NF_ACCEPT; | 1400 | return NF_ACCEPT; |
1402 | } | 1401 | } |