1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

ipfiler bug #550 filter rule list corrupted with inserted rules

Obtained from:	ipfilter CVS repo (r1.128); NetBSD CVS repo (r1.15)
This commit is contained in:
Cy Schubert 2014-10-05 03:41:47 +00:00
parent 6e5254e0d7
commit 7db9f2ba58
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272551

View File

@ -4496,7 +4496,15 @@ frrequest(softc, unit, req, data, set, makecopy)
fp = f;
f = NULL;
fp->fr_next = NULL;
fp->fr_dnext = NULL;
fp->fr_pnext = NULL;
fp->fr_pdnext = NULL;
fp->fr_grp = NULL;
fp->fr_grphead = NULL;
fp->fr_icmpgrp = NULL;
fp->fr_isc = (void *)-1;
fp->fr_ptr = NULL;
fp->fr_ref = 0;
fp->fr_flags |= FR_COPIED;
} else {
@ -5000,7 +5008,9 @@ frrequest(softc, unit, req, data, set, makecopy)
if (f->fr_collect > fp->fr_collect)
break;
ftail = &f->fr_next;
fprev = ftail;
}
ftail = fprev;
f = NULL;
ptr = NULL;
} else if (req == (ioctlcmd_t)SIOCINAFR ||
@ -5091,6 +5101,8 @@ frrequest(softc, unit, req, data, set, makecopy)
fp->fr_ref = 1;
fp->fr_pnext = ftail;
fp->fr_next = *ftail;
if (fp->fr_next != NULL)
fp->fr_next->fr_pnext = &fp->fr_next;
*ftail = fp;
if (addrem == 0)
ipf_fixskip(ftail, fp, 1);