[SR-Dev] Patch: fix nathelper module loading

Henning Westerholt henning.westerholt at 1und1.de
Tue Apr 14 15:53:51 CEST 2009


Hi,

this patch fixes the module loading for the nathelper module. The module 
registers the additional processes only (for ping timers) only when 
natping_interval > 0. Thus we need to check for this variable in the 
child_init(..) function as well.

Cheers,

Henning


diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index e9666bf..4118bf2 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -1166,7 +1166,7 @@ child_init(int rank)
 	struct rtpp_set  *rtpp_list;
 	struct rtpp_node *pnode;
 
-	if (rank==PROC_MAIN) {
+	if (rank==PROC_MAIN && natping_interval > 0) {
 		for( i=0 ; i<natping_processes ; i++ ) {
 			if(fork_dummy_timer(PROC_TIMER, "TIMER NH", 1 /*socks flag*/,
 								nh_timer, (void*)(unsigned long)i,



More information about the sr-dev mailing list