netdev
[Top] [All Lists]

Re: [PATCH] IPSec: Use of "sizeof" for header sizes, part II

To: yoshfuji@xxxxxxxxxxxxxx
Subject: Re: [PATCH] IPSec: Use of "sizeof" for header sizes, part II
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Tue, 01 Apr 2003 20:02:25 -0800 (PST)
Cc: toml@xxxxxxxxxx, netdev@xxxxxxxxxxx, kuznet@xxxxxxxxxxxxx
In-reply-to: <20030402.130232.78951283.yoshfuji@xxxxxxxxxxxxxx>
References: <20030402.122518.62753078.yoshfuji@xxxxxxxxxxxxxx> <20030401.193429.64279267.davem@xxxxxxxxxx> <20030402.130232.78951283.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
   From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
   Date: Wed, 02 Apr 2003 13:02:32 +0900 (JST)

   In article <20030401.193429.64279267.davem@xxxxxxxxxx> (at Tue, 01 Apr 2003 
19:34:29 -0800 (PST)), "David S. Miller" <davem@xxxxxxxxxx> says:
   
   >    How about just removing 8 bytes from struct {ip,ipv6}_esp_hdr
   >    like this?
   >    
   > Sure, but does anyone need the 8 bytes there?  I thought so, which is
   > why I didn't think about your suggestion :-)
   
   Let's define
     #define IPV6_ESP_MINDATA  8
   
   and put "(sizeof(struct ip6_esp_hdr) + IPV6_ESP_MINDATA)" in such places.

I just checked, nobody cares about the 8 bytes in enc_data.

Therefore, I think you're idea of enc_data[0] is the best.

Someone please double check my claims and submit a patch. :-)

<Prev in Thread] Current Thread [Next in Thread>