[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipfilter
Subject:    Re: can't remove a nested group rule
From:       Darren Reed <darrenr () reed ! wattle ! id ! au>
Date:       2002-05-28 12:42:01
[Download RAW message or body]


This patch fixes this problem.

Darren

Index: ip_fil.c
===================================================================
RCS file: /devel/CVS/IP-Filter/ip_fil.c,v
retrieving revision 2.42.2.55
diff -c -r2.42.2.55 ip_fil.c
*** ip_fil.c	2002/03/26 15:54:39	2.42.2.55
--- ip_fil.c	2002/05/28 12:40:24
***************
*** 887,893 ****
  	 * Check that the group number does exist and that if a head group
  	 * has been specified, doesn't exist.
  	 */
! 	if ((req != SIOCZRLST) && fp->fr_grhead &&
  	    fr_findgroup((u_int)fp->fr_grhead, fp->fr_flags, unit, set, NULL))
  		return EEXIST;
  	if ((req != SIOCZRLST) && fp->fr_group &&
--- 892,899 ----
  	 * Check that the group number does exist and that if a head group
  	 * has been specified, doesn't exist.
  	 */
! 	if ((req != SIOCZRLST) && ((req == SIOCINAFR) || (req == SIOCINIFR) ||
! 	     (req == SIOCADAFR) || (req == SIOCADIFR)) && fp->fr_grhead &&
  	    fr_findgroup((u_int)fp->fr_grhead, fp->fr_flags, unit, set, NULL))
  		return EEXIST;
  	if ((req != SIOCZRLST) && fp->fr_group &&
Index: ip_sfil.c
===================================================================
RCS file: /devel/CVS/IP-Filter/Attic/ip_sfil.c,v
retrieving revision 2.23.2.16
diff -c -r2.23.2.16 ip_sfil.c
*** ip_sfil.c	2002/04/05 08:43:25	2.23.2.16
--- ip_sfil.c	2002/05/28 12:39:02
***************
*** 422,428 ****
  	 * Check that the group number does exist and that if a head group
  	 * has been specified, doesn't exist.
  	 */
! 	if ((req != SIOCZRLST) && fp->fr_grhead &&
  	    fr_findgroup(fp->fr_grhead, fp->fr_flags, unit, set, NULL)) {
  		error = EEXIST;
  		goto out;
--- 426,433 ----
  	 * Check that the group number does exist and that if a head group
  	 * has been specified, doesn't exist.
  	 */
! 	if ((req != SIOCZRLST) && ((req == SIOCINAFR) || (req == SIOCINIFR) ||
! 	     (req == SIOCADAFR) || (req == SIOCADIFR)) && fp->fr_grhead &&
  	    fr_findgroup(fp->fr_grhead, fp->fr_flags, unit, set, NULL)) {
  		error = EEXIST;
  		goto out;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic