Subject: Re: alignment crash in v6 ipfilter when receiving on gif
To: None <port-sparc64@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc64
Date: 07/17/2007 11:26:36
> + /*
> + * XXX cast to i6addr_t is unsafe because it
> + * presumes void * alignment which may not be
> + * true, but IP6_NEQ casts to u_32_t.
> + */
While this is fine for sparc64, and I think is OK for all architectures
NetBSD supports, it is not correct C; converting to i6addr_t * may lose
information, which of course cannot be recovered by casting back to
some other type.
Why cast to i6addr_t * at all, when IP6_NEQ casts immediately anyway?
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B