Index: sbin/ipfw/ipfw2.c =================================================================== --- sbin/ipfw/ipfw2.c +++ sbin/ipfw/ipfw2.c @@ -4561,6 +4561,19 @@ break; case TOK_FRAG: + /* + * Compatibility: argument after "frag" + * which is not a frag token equals to "frag offset" + */ + + if (((*av != NULL) && (strchr(*av, ',') == NULL)) && + (((strchr(*av, '!') == NULL) && (match_token(f_ipoff, *av) == -1)) || + (**av == '!' && (match_token(f_ipoff, *av + 1) == -1)))) { + fill_flags_cmd(cmd, O_FRAG, f_ipoff, NULL); + cmd->arg1 = 0x1; + break; + } + fill_flags_cmd(cmd, O_FRAG, f_ipoff, *av); /* * Compatibility: no argument after "frag"