Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2005 13:07:47 +0300
From:      Ari Suutari <ari@suutari.iki.fi>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Policy routing idea (Was: ipfw: Would it be possible to continue processing rest of rules after match ?)
Message-ID:  <42BA89F3.3060406@suutari.iki.fi>
In-Reply-To: <20050623010618.B7580@xorpc.icir.org>
References:  <42B7B352.8040806@suutari.iki.fi> <42BA6A22.6030506@suutari.iki.fi> <20050623010618.B7580@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42BA89F3.3060406>