Fix a problem with unnumbered rules introduced in latest commit.

Reported by: des
This commit is contained in:
Luigi Rizzo 2001-10-01 17:35:54 +00:00
parent 7bdc285403
commit cc33247e33
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84315

View file

@ -1654,9 +1654,9 @@ add_entry(struct ip_fw_head *head, struct ip_fw *rule)
/* If entry number is 0, find highest numbered rule and add 100 */
if (ftmp->fw_number == 0) {
LIST_FOREACH(ftmp, head, next) {
if (ftmp->fw_number != IPFW_DEFAULT_RULE)
nbr = ftmp->fw_number;
LIST_FOREACH(fcp, head, next) {
if (fcp->fw_number != IPFW_DEFAULT_RULE)
nbr = fcp->fw_number;
else
break;
}