BUGFIX: make use of the pointer to the target of skipto rules,

so that after the first time we can follow the pointer instead
of having to scan the list.
This was the intended behaviour from day one.

PR: 34639
MFC-after: 3 days
This commit is contained in:
Luigi Rizzo 2002-02-20 17:15:57 +00:00
parent db6c6159b0
commit ca462bcfcb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90988

View File

@ -1512,11 +1512,13 @@ ip_fw_chk(struct ip **pip, int hlen,
return(f->fw_divert_port | IP_FW_PORT_TEE_FLAG);
#endif
case IP_FW_F_SKIPTO: /* XXX check */
f = f->next_rule_ptr ? f->next_rule_ptr :
lookup_next_rule(f) ;
if (f->next_rule_ptr == NULL)
f->next_rule_ptr = lookup_next_rule(f) ;
f = f->next_rule_ptr;
if (!f)
goto dropit;
goto again ;
case IP_FW_F_PIPE:
case IP_FW_F_QUEUE:
*flow_id = f; /* XXX set flow id */