Re: [XFRM]: Fix ICMP tempsel
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-02-19 18:43:51
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-02-19 18:43:51
On Sat, Feb 19, 2005 at 12:43:43PM +0100, Patrick McHardy wrote:
The selector ports are initialized to fl_ip_sport/fl_ip_dport instead of xfrm_flowi_sport(fl)/xfrm_flowi_dport(fl). This is wrong for ICMP, type and code should be stored in sport and dport, in struct flowi both are contained in fl_ip_sport.
I know this comment is probably a bit late but why didn't we simply put
type/code into sport/dport in struct flowi instead of introducing the
monstrosities of xfrm_flowi_sport/xfrm_flowi_dport?
Something like
struct {
__u16 type;
__u16 code;
} icmpt;
would've done (and still would do) the trick, no?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt