mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
Another case where UNALIGNED_MEMCPY() is probably necessary.
It was necessary in other cases where we copied IP addresses from the IP header, so it's probably necessary here as well.
This commit is contained in:
parent
2c56ace004
commit
62353c08b0
@ -994,14 +994,14 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp)
|
||||
xmep->xid = rp->rm_xid;
|
||||
if (ip) {
|
||||
xmep->ipver = 4;
|
||||
memcpy(&xmep->client, &ip->ip_src, sizeof(ip->ip_src));
|
||||
memcpy(&xmep->server, &ip->ip_dst, sizeof(ip->ip_dst));
|
||||
UNALIGNED_MEMCPY(&xmep->client, &ip->ip_src, sizeof(ip->ip_src));
|
||||
UNALIGNED_MEMCPY(&xmep->server, &ip->ip_dst, sizeof(ip->ip_dst));
|
||||
}
|
||||
#ifdef INET6
|
||||
else if (ip6) {
|
||||
xmep->ipver = 6;
|
||||
memcpy(&xmep->client, &ip6->ip6_src, sizeof(ip6->ip6_src));
|
||||
memcpy(&xmep->server, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
|
||||
UNALIGNED_MEMCPY(&xmep->client, &ip6->ip6_src, sizeof(ip6->ip6_src));
|
||||
UNALIGNED_MEMCPY(&xmep->server, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
|
||||
}
|
||||
#endif
|
||||
xmep->proc = EXTRACT_32BITS(&rp->rm_call.cb_proc);
|
||||
|
Loading…
Reference in New Issue
Block a user