diff options
Diffstat (limited to 'include/net/ip_vs.h')
| -rw-r--r-- | include/net/ip_vs.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index a0bec23c6d5e..a0d2e0bb9a94 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -335,6 +335,11 @@ enum ip_vs_sctp_states { | |||
| 335 | IP_VS_SCTP_S_LAST | 335 | IP_VS_SCTP_S_LAST |
| 336 | }; | 336 | }; |
| 337 | 337 | ||
| 338 | /* Connection templates use bits from state */ | ||
| 339 | #define IP_VS_CTPL_S_NONE 0x0000 | ||
| 340 | #define IP_VS_CTPL_S_ASSURED 0x0001 | ||
| 341 | #define IP_VS_CTPL_S_LAST 0x0002 | ||
| 342 | |||
| 338 | /* Delta sequence info structure | 343 | /* Delta sequence info structure |
| 339 | * Each ip_vs_conn has 2 (output AND input seq. changes). | 344 | * Each ip_vs_conn has 2 (output AND input seq. changes). |
| 340 | * Only used in the VS/NAT. | 345 | * Only used in the VS/NAT. |
| @@ -1221,7 +1226,7 @@ struct ip_vs_conn *ip_vs_conn_new(const struct ip_vs_conn_param *p, int dest_af, | |||
| 1221 | struct ip_vs_dest *dest, __u32 fwmark); | 1226 | struct ip_vs_dest *dest, __u32 fwmark); |
| 1222 | void ip_vs_conn_expire_now(struct ip_vs_conn *cp); | 1227 | void ip_vs_conn_expire_now(struct ip_vs_conn *cp); |
| 1223 | 1228 | ||
| 1224 | const char *ip_vs_state_name(__u16 proto, int state); | 1229 | const char *ip_vs_state_name(const struct ip_vs_conn *cp); |
| 1225 | 1230 | ||
| 1226 | void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp); | 1231 | void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp); |
| 1227 | int ip_vs_check_template(struct ip_vs_conn *ct, struct ip_vs_dest *cdest); | 1232 | int ip_vs_check_template(struct ip_vs_conn *ct, struct ip_vs_dest *cdest); |
| @@ -1289,6 +1294,17 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) | |||
| 1289 | atomic_inc(&ctl_cp->n_control); | 1294 | atomic_inc(&ctl_cp->n_control); |
| 1290 | } | 1295 | } |
| 1291 | 1296 | ||
| 1297 | /* Mark our template as assured */ | ||
| 1298 | static inline void | ||
| 1299 | ip_vs_control_assure_ct(struct ip_vs_conn *cp) | ||
| 1300 | { | ||
| 1301 | struct ip_vs_conn *ct = cp->control; | ||
| 1302 | |||
| 1303 | if (ct && !(ct->state & IP_VS_CTPL_S_ASSURED) && | ||
| 1304 | (ct->flags & IP_VS_CONN_F_TEMPLATE)) | ||
| 1305 | ct->state |= IP_VS_CTPL_S_ASSURED; | ||
| 1306 | } | ||
| 1307 | |||
| 1292 | /* IPVS netns init & cleanup functions */ | 1308 | /* IPVS netns init & cleanup functions */ |
| 1293 | int ip_vs_estimator_net_init(struct netns_ipvs *ipvs); | 1309 | int ip_vs_estimator_net_init(struct netns_ipvs *ipvs); |
| 1294 | int ip_vs_control_net_init(struct netns_ipvs *ipvs); | 1310 | int ip_vs_control_net_init(struct netns_ipvs *ipvs); |
