Re: Policy routing idea (Was: ipfw: Would it be possible to continue processing rest of rules after match ?)

From: Ari Suutari (ari_at_suutari.iki.fi)
Date: 06/23/05

  • Next message: Ari Suutari: "Re: Policy routing idea (Was: ipfw: Would it be possible to continue processing rest of rules after match ?)"
    Date: Thu, 23 Jun 2005 13:07:47 +0300
    To: Luigi Rizzo <rizzo@icir.org>
    
    

    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.
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Ari Suutari: "Re: Policy routing idea (Was: ipfw: Would it be possible to continue processing rest of rules after match ?)"

    Relevant Pages