Commit c75303269009667cc2b7ddee274bc9e96e840f57
Committed by
Pablo Neira Ayuso
1 parent
1974d2453f
netfilter: cttimeout: Make NF_CT_NETLINK_TIMEOUT depend on NF_CONNTRACK_TIMEOUT
With this, remove ifdef for CONFIG_NF_CONNTRACK_TIMEOUT in nfnetlink_cttimeout. This is also required for moving ctnl_untimeout from nfnetlink_cttimeout to nf_conntrack_timeout. Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Showing 2 changed files with 1 additions and 6 deletions Side-by-side Diff
net/netfilter/Kconfig
... | ... | @@ -365,6 +365,7 @@ |
365 | 365 | tristate 'Connection tracking timeout tuning via Netlink' |
366 | 366 | select NETFILTER_NETLINK |
367 | 367 | depends on NETFILTER_ADVANCED |
368 | + depends on NF_CONNTRACK_TIMEOUT | |
368 | 369 | help |
369 | 370 | This option enables support for connection tracking timeout |
370 | 371 | fine-grain tuning. This allows you to attach specific timeout |
net/netfilter/nfnetlink_cttimeout.c
... | ... | @@ -503,7 +503,6 @@ |
503 | 503 | return err; |
504 | 504 | } |
505 | 505 | |
506 | -#ifdef CONFIG_NF_CONNTRACK_TIMEOUT | |
507 | 506 | static struct ctnl_timeout * |
508 | 507 | ctnl_timeout_find_get(struct net *net, const char *name) |
509 | 508 | { |
... | ... | @@ -534,7 +533,6 @@ |
534 | 533 | |
535 | 534 | module_put(THIS_MODULE); |
536 | 535 | } |
537 | -#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */ | |
538 | 536 | |
539 | 537 | static const struct nfnl_callback cttimeout_cb[IPCTNL_MSG_TIMEOUT_MAX] = { |
540 | 538 | [IPCTNL_MSG_TIMEOUT_NEW] = { .call = cttimeout_new_timeout, |
541 | 539 | |
... | ... | @@ -605,10 +603,8 @@ |
605 | 603 | "nfnetlink.\n"); |
606 | 604 | goto err_out; |
607 | 605 | } |
608 | -#ifdef CONFIG_NF_CONNTRACK_TIMEOUT | |
609 | 606 | RCU_INIT_POINTER(nf_ct_timeout_find_get_hook, ctnl_timeout_find_get); |
610 | 607 | RCU_INIT_POINTER(nf_ct_timeout_put_hook, ctnl_timeout_put); |
611 | -#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */ | |
612 | 608 | return 0; |
613 | 609 | |
614 | 610 | err_out: |
615 | 611 | |
... | ... | @@ -621,11 +617,9 @@ |
621 | 617 | nfnetlink_subsys_unregister(&cttimeout_subsys); |
622 | 618 | |
623 | 619 | unregister_pernet_subsys(&cttimeout_ops); |
624 | -#ifdef CONFIG_NF_CONNTRACK_TIMEOUT | |
625 | 620 | RCU_INIT_POINTER(nf_ct_timeout_find_get_hook, NULL); |
626 | 621 | RCU_INIT_POINTER(nf_ct_timeout_put_hook, NULL); |
627 | 622 | synchronize_rcu(); |
628 | -#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */ | |
629 | 623 | } |
630 | 624 | |
631 | 625 | module_init(cttimeout_init); |