Hi,
Luigi Rizzo wrote:
for the chunk at --- 2951,2987 ----
i think it would be better to reuse the 'case TOK_FORWARD',
by changing the opcode and messages according to the actual command.
Changed.
here too i would reuse the existing code more, e.g. in ipfw_log()
put 'case O_SETNEXTHOP' next to case 'O_FORWARD_IP' and replace
the string "Forward" in the first snprintf() with "%s" and an
additional argument cmd->opcode == O_FORWARD_IP ? "Forward" : "SetNextHop"
Done.
Same in the action part at --- 2474,2490 ----, just reuse the
O_FORWARD case and end the block with
if (cmd->opcode == O_FORWARD_IP)
goto done;
else
goto next_rule;
Done.
and the check for instruction format --- 3055,3069 ----
can just reuse the O_FORWARD_IP code with no modifications.
Done.
Updated patch files are again at http://www.suutari.iki.fi/freebsd/
Also, some limited testing has been done.
Ari S.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"