Re: ipset command ipporthash anormal behavior

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

 



Hi,

On Tue, 4 Apr 2006, Clist wrote:

> ipset -N clients ipporthash --from 192.168.153.206 --to 192.168.153.207
> --hashsize 1024 --probes 4 --resize 50 || echo "failure .."
>
> it prints :
>
> "failure .."
>
> But the set got created!!.
>
> This is confusing and make my script run bad, if the commnad ran sucessfully,
>
> Why it returns error code !=0 to the OS??

That's a small bug: the set specific parse function returns 1 when it
could parse the command line successfully and this return value is not
erased later, but used as the final return value of the ipset command.

There'll be a new release somewhere in this month: until then you can use
the attached patch.

Best regards,
Jozsef
-
E-mail  : kadlec@xxxxxxxxxxxxxxxxx, kadlec@xxxxxxxxxxxxxxx
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
diff -urN ipset-2.2.8/ipset.c ipset-2.2.9/ipset.c
--- ipset-2.2.8/ipset.c	2005-11-24 10:08:57.000000000 +0100
+++ ipset-2.2.9/ipset.c	2006-04-06 11:51:28.000000000 +0200
@@ -2099,7 +2099,8 @@
 					exit_error(PARAMETER_PROBLEM,
 						   "Unknown arg `%s'",
 						   argv[optind - 1]);
-
+				
+				res = 0;
 			}
 
 			DP("next arg");

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux