To be used by callers from other modules. [ Rename DAY to NF_CT_DAY to avoid possible symbol name pollution issue --Pablo ]
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -279,6 +279,18 @@ static inline bool nf_ct_should_gc(const struct nf_conn *ct) · 278 unmodified lines | |||
| 279 | !nf_ct_is_dying(ct); | 279 | !nf_ct_is_dying(ct); |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | #define NF_CT_DAY (86400 * HZ) | ||
| 283 | |||
| 284 | /* Set an arbitrary timeout large enough not to ever expire, this save | ||
| 285 | * us a check for the IPS_OFFLOAD_BIT from the packet path via | ||
| 286 | * nf_ct_is_expired(). | ||
| 287 | */ | ||
| 288 | static inline void nf_ct_offload_timeout(struct nf_conn *ct) | ||
| 289 | { | ||
| 290 | if (nf_ct_expires(ct) < NF_CT_DAY / 2) | ||
| 291 | ct->timeout = nfct_time_stamp + NF_CT_DAY; | ||
| 292 | } | ||
| 293 | |||
| 282 | struct kernel_param; | 294 | struct kernel_param; |
| 283 | 295 | ||
| 284 | int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp); | 296 | int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp); |