If the first action is O_LOG adjust a pointer to the real one, unbreaks

skipto + log rules.

Reported by:	Wiktor Niesiobedzki <w@evip.pl>
MFC after:	1 week
This commit is contained in:
maxim 2003-01-20 11:58:34 +00:00
parent 869bbbc0c8
commit a788b0cbe7

View File

@ -1180,6 +1180,8 @@ lookup_next_rule(struct ip_fw *me)
/* look for action, in case it is a skipto */
cmd = ACTION_PTR(me);
if (cmd->opcode == O_LOG)
cmd += F_LEN(cmd);
if ( cmd->opcode == O_SKIPTO )
for (rule = me->next; rule ; rule = rule->next)
if (rule->rulenum >= cmd->arg1)