Fix panic introduced by r282070.
Arm friendly KASSERT() to ease debug of similar crashes. Submitted by: Olivier Cochard-Labbé
This commit is contained in:
parent
3b7f258a4d
commit
e948489558
@ -1647,7 +1647,6 @@ check_ipfw_rule_body(ipfw_insn *cmd, int cmd_len, struct rule_check_info *ci)
|
||||
return EINVAL;
|
||||
if (cmdlen != F_INSN_SIZE(ipfw_insn_nat))
|
||||
goto bad_size;
|
||||
ci->object_opcodes++;
|
||||
goto check_action;
|
||||
case O_FORWARD_MAC: /* XXX not implemented yet */
|
||||
case O_CHECK_STATE:
|
||||
|
@ -3399,6 +3399,10 @@ ref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule,
|
||||
|
||||
IPFW_UH_WUNLOCK(ch);
|
||||
|
||||
KASSERT(found + unresolved == ci->object_opcodes,
|
||||
("refcount incosistency: found: %d unr: %d total: %d",
|
||||
found, unresolved, ci->object_opcodes));
|
||||
|
||||
/* Perform auto-creation for non-existing objects */
|
||||
if (numnew != 0)
|
||||
error = create_objects_compat(ch, rule->cmd, oib, pidx, ti);
|
||||
|
Loading…
Reference in New Issue
Block a user