diff options
Diffstat (limited to 'net/ipv4/netfilter/nf_nat_sip.c')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_sip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c index d0319f96269..57932c43960 100644 --- a/net/ipv4/netfilter/nf_nat_sip.c +++ b/net/ipv4/netfilter/nf_nat_sip.c | |||
@@ -526,6 +526,11 @@ err1: | |||
526 | return NF_DROP; | 526 | return NF_DROP; |
527 | } | 527 | } |
528 | 528 | ||
529 | static struct nf_ct_helper_expectfn sip_nat = { | ||
530 | .name = "sip", | ||
531 | .expectfn = ip_nat_sip_expected, | ||
532 | }; | ||
533 | |||
529 | static void __exit nf_nat_sip_fini(void) | 534 | static void __exit nf_nat_sip_fini(void) |
530 | { | 535 | { |
531 | RCU_INIT_POINTER(nf_nat_sip_hook, NULL); | 536 | RCU_INIT_POINTER(nf_nat_sip_hook, NULL); |
@@ -535,6 +540,7 @@ static void __exit nf_nat_sip_fini(void) | |||
535 | RCU_INIT_POINTER(nf_nat_sdp_port_hook, NULL); | 540 | RCU_INIT_POINTER(nf_nat_sdp_port_hook, NULL); |
536 | RCU_INIT_POINTER(nf_nat_sdp_session_hook, NULL); | 541 | RCU_INIT_POINTER(nf_nat_sdp_session_hook, NULL); |
537 | RCU_INIT_POINTER(nf_nat_sdp_media_hook, NULL); | 542 | RCU_INIT_POINTER(nf_nat_sdp_media_hook, NULL); |
543 | nf_ct_helper_expectfn_unregister(&sip_nat); | ||
538 | synchronize_rcu(); | 544 | synchronize_rcu(); |
539 | } | 545 | } |
540 | 546 | ||
@@ -554,6 +560,7 @@ static int __init nf_nat_sip_init(void) | |||
554 | RCU_INIT_POINTER(nf_nat_sdp_port_hook, ip_nat_sdp_port); | 560 | RCU_INIT_POINTER(nf_nat_sdp_port_hook, ip_nat_sdp_port); |
555 | RCU_INIT_POINTER(nf_nat_sdp_session_hook, ip_nat_sdp_session); | 561 | RCU_INIT_POINTER(nf_nat_sdp_session_hook, ip_nat_sdp_session); |
556 | RCU_INIT_POINTER(nf_nat_sdp_media_hook, ip_nat_sdp_media); | 562 | RCU_INIT_POINTER(nf_nat_sdp_media_hook, ip_nat_sdp_media); |
563 | nf_ct_helper_expectfn_register(&sip_nat); | ||
557 | return 0; | 564 | return 0; |
558 | } | 565 | } |
559 | 566 | ||