| To: | davem@xxxxxxxxxx |
|---|---|
| Subject: | Re: [PATCH] IPSec: Use of "sizeof" for header sizes, part II |
| From: | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> |
| Date: | Wed, 02 Apr 2003 13:02:32 +0900 (JST) |
| Cc: | toml@xxxxxxxxxx, netdev@xxxxxxxxxxx, kuznet@xxxxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx |
| In-reply-to: | <20030401.193429.64279267.davem@redhat.com> |
| Organization: | USAGI Project |
| References: | <20030401.140727.73666851.davem@redhat.com> <20030402.122518.62753078.yoshfuji@linux-ipv6.org> <20030401.193429.64279267.davem@redhat.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
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.
Or, how about this?
(offsetof(struct ip6_esp_hdr, enc_data) + datalen)
instead of
((sizeof(struct ip6_esp_hdr) - sizeof(esp->enc_data)) + datalen)
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Must dev->set_multicast_list() complete before returning?, Donald Becker |
|---|---|
| Next by Date: | Re: [PATCH] IPSec: Use of "sizeof" for header sizes, part II, David S. Miller |
| Previous by Thread: | Re: [PATCH] IPSec: Use of "sizeof" for header sizes, part II, David S. Miller |
| Next by Thread: | Re: [PATCH] IPSec: Use of "sizeof" for header sizes, part II, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |