[Click] IPRewriter and ICMP packets

Erik VandeKieft evandeki at cs.ucsd.edu
Fri Jul 30 18:46:44 EDT 2004


> The IPRewriter table is looked up using five properties: src addr, src port, dst
> addr, dst port, protocol.  Note that completely different mappings might be
> installed for different tuples.  For example you might have
>
>     <1.0.0.1, 20, 2.0.0.2, 30, TCP>  =>  <128.0.0.4, 929, 2.0.0.2, 30, TCP>
>     <1.0.0.1, 40, 2.0.0.2, 59, UDP>  =>  <94.92.0.1, 40, 2.0.0.2, 59, UDP>
>
> Note different src addrs.
>
> Now an ICMP ping has three properties: source addr, dest addr, and identifier.
> Say a ping <1.0.0.1, 2.0.0.2, 40> arrived when the IPRewriter was in the above
> state.  How should that ping be rewritten?  Src addr 128.0.0.4 or 94.92.0.1?

Hmmm. Actually, now that I think about it, I guess I could have been using
just an IPAddrRewriter rather than an IPRewriter all this time, since I
never translate any ports. I can always look up my mappings based on just
the source and destination IP address.

Since that doesn't look at ports, couldn't that work with ICMP ping
packets? The ICMPPingRewriter as its written still isn't enough because it
wants a static NEWSRC and NEWDST; I at least want it to look in the table
of an IPAddrRewriter.

Thanks! Sorry about the confusion there...

--Erik


More information about the click mailing list