Use UNALIGNED_MEMCPY() to extract the XID from it; otherwise, this might
crash on machines that require strict alignment (e.g., SPARC machines).
Fixes GitHub issue #478.
{
int i;
struct xid_map_entry *xmep;
- uint32_t xid = rp->rm_xid;
+ uint32_t xid;
struct ip *ip = (struct ip *)bp;
#ifdef INET6
struct ip6_hdr *ip6 = (struct ip6_hdr *)bp;
#endif
int cmp;
+ UNALIGNED_MEMCPY(&xid, &rp->rm_xid, sizeof(xmep->xid));
/* Start searching from where we last left off */
i = xid_map_hint;
do {