Subject: Re: alignment crash in v6 ipfilter when receiving on gif
To: Greg Troxel <gdt@ir.bbn.com>
From: Chris Ross <cross+netbsd@distal.com>
List: port-sparc64
Date: 07/10/2007 14:53:03
On Jul 10, 2007, at 12:47 PM, Greg Troxel wrote:
> I think Martin is right that i6addr_t must be aligned to 64 bits and
> thus the compiler assumes it is after a cast and is correct to  
> coalesce
> two 32-bit compares to a 64-bit compare.
>
> I took the patch from Geoff's mail and re-applied it by hand since the
> diff was munged by the archives.  This is against the current contents
> of netbsd-4.
>
> With the patch, I can traceroute from and through my sparc64 router.
>
> Should I commit this to -current and then request a pullup after a  
> week?
> The patch applies with only a bit of fuzz/offset, so pretty clearly  
> the
> same issue would be present there.

   I'm curious if this is actually the best fix, or if Darren's  
suggestion(1) of
using a bcmp instead of using the IP6_NEQ() macro might be a better
fix?  I guess it's a function-call either way, so it may not matter...

   Thanks...

                       - Chris

(1) http://marc.info/?l=ipfilter&m=118119360617643&w=2