Re: [patch 3/4] ipset: do session initialization once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Jan 2011, holger@xxxxxxxxxxxxxxxx wrote:

> Signed-off-by: Holger Eitzenberger <holger@xxxxxxxxxxxxxxxx>
> 
> Index: ipset/src/ipset.c
> ===================================================================
> --- ipset.orig/src/ipset.c	2011-01-05 12:05:31.000000000 +0100
> +++ ipset/src/ipset.c	2011-01-05 12:07:02.000000000 +0100
> @@ -431,14 +431,6 @@
>  	const struct ipset_commands *command;
>  	const struct ipset_type *type;
>  
> -	/* Initialize session */
> -	if (session == NULL) {
> -		session = ipset_session_init(printf);
> -		if (session == NULL)
> -			return exit_error(OTHER_PROBLEM,
> -				"Cannot initialize ipset session, aborting.");
> -	}
> -
>  	/* Commandline parsing, somewhat similar to that of 'ip' */
>  
>  	/* First: parse core options */
> @@ -743,5 +735,10 @@
>  	ipset_type_add(&ipset_hash_ipportnet0);
>  	ipset_type_add(&ipset_list_set0);
>  
> +	session = ipset_session_init(printf);
> +	if (session == NULL)
> +		return exit_error(OTHER_PROBLEM,
> +						  "Cannot initialize ipset session, aborting.");
> +
>  	return parse_commandline(argc, argv);
>  }
> 
> -- 
> 

Applied, thanks!

Best regards,
Jozsef
-
E-mail  : kadlec@xxxxxxxxxxxxxxxxx, kadlec@xxxxxxxxxxxx
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux