>
> Sure enough, that fixes this warning.  Yea.  But, sadly, it causes
> other problems.  If you look at sbin/atm/atmconfig/natm.c you'll see
> code like:
> 
> static void
> store_route(struct rt_msghdr *rtm)
> {
> ...
>       char *cp
>       struct sockaddr *sa;
>       ...
> 
>       cp = (char *)(rtm + 1);
> ...
>                       sa = (struct sockaddr *)cp;
>                       cp += roundup(sa->sa_len, sizeof(long));
> ...
> 
> which breaks because we're now casting from an __aligned(1) char * to
> an __aligned(8) sockaddr *.

> And it is only rounding the size of the structure to long, rather than
> int64 like sockaddr_storage suggests is the proper alignment.  But I
> haven't looked in the kernel to see if there's an issue there with
> routing sockets or not.
> 

In the kernel route.h, the macro SA_SIZE is used by the routing socket
code and may the root of the problem.

-- Qing



_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to