Subject: Re: alignment crash in v6 ipfilter when receiving on gif
To: Pavel Cahyna <pavel@netbsd.org>
From: Martin Husemann <martin@duskware.de>
List: port-sparc64
Date: 07/12/2007 11:04:32
On Thu, Jul 12, 2007 at 10:57:33AM +0200, Pavel Cahyna wrote:
> struct ip6_hdr is in fact declared with __attribute__((__packed__)).
> Shouldn't it indicate that its members can be misaligned, too? Maybe the
> problem is the cast (i6addr_t *)&ip6->ip6_src ?

Yes, that is how I read it too. This cast increases alignment requirements,
so if we get rid of it even memcpy will work (but I like the memcmp() variant
better, overall).

Martin