[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

radvd unaligned trap errors

Steve et. al.,

Many moons ago I mentioned seeing a lot of unaligned traps when running
radvd.  I finally tracked down the cause...  My workaround isn't the
proper fix, but at least illustrates what the problem is.  Anyway, the
trap occurs in the vicinity of line 299 in send.c:send_ra():

cmsg->cmsg_len   = CMSG_LEN(sizeof(struct in6_pktinfo));

and the workaround on the Alpha is to force 8-byte alignment (sizeof(size_t),
which is the size of the cmsg_len structure member) where chdr is declared
near the beginning of send_ra():

/* char chdr[CMSG_SPACE(sizeof(struct in6_pktinfo))]; */
   char __attribute__((aligned(8))) chdr[CMSG_SPACE(sizeof(struct in6_pktinfo))];

Bob Tracy          |  "They couldn't hit an elephant at this dist- "
rct@frus.com       |   - Last words of Union General John Sedgwick,
                   |  Battle of Spotsylvania Court House, U.S. Civil War

Reply to: