[PATCH]: bug with --dst-range in libipt_iprange.c

Nicolas Bouliane nib@cookinglinux.org
Sun, 11 Jul 2004 21:05:34 -0400 (EDT)


When using --dst-range twice, which is supposed to return an error,
the second given ip range is overwriting the previously set ip range.

The --src-range option is working perfectly; we can't use it twice.
But --dst-range just doesn't because the flag is always reset to 1.

Patch below.

Signed-off-by: Nicolas Bouliane <nib@cookinglinux.org>

diff -urpN libipt_iprange.c.orig libipt_iprange.c
--- libipt_iprange.c.orig       2004-07-11 16:34:43.000000000 -0400
+++ libipt_iprange.c    2004-07-11 16:35:16.000000000 -0400
@@ -99,8 +99,8 @@ parse(int c, char **argv, int invert, un
                        info->flags |=3D IPRANGE_DST_INV;

                parse_iprange(optarg, &info->dst);
-               *flags =3D 1;
-               break;
+
+      break;

        default:
                return 0;


---
Nicolas Bouliane,
Samuel Jean
at cookinglinux.org