logo       

Re: [PATCH] IPSec: Use of "sizeof" for header sizes: msg#00277

Subject: Re: [PATCH] IPSec: Use of "sizeof" for header sizes
   From: Tom Lendacky <toml@xxxxxxxxxx>
   Date: 31 Mar 2003 12:07:08 -0600

   Below is a patch for your consideration eliminating the use of some
   constants in the AH and ESP routines for IPv4 and IPv6.  I believe
   there was also a typo in a memcpy statement in net/ipv4/ah.c where
   iph->ihl was multiplied by 5 instead of 4.
   
Thanks a lot Tom, Applied.  Looks like not too many people have
been testing IPSEC links with IP options :-)

     - use sizeof ip(v6)_esp_hdr and substract the sizeof enc_data

This sounds the best.  It's a bit much to type, but it's the
most descriptive expression.




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