mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
As with memcpy, so with memcmp.
This commit is contained in:
parent
47fc89d711
commit
c5cafaa8ee
@ -1035,18 +1035,18 @@ xid_map_find(const struct sunrpc_msg *rp, const u_char *bp, u_int32_t *proc,
|
||||
goto nextitem;
|
||||
switch (xmep->ipver) {
|
||||
case 4:
|
||||
if (memcmp(&ip->ip_src, &xmep->server,
|
||||
if (UNALIGNED_MEMCMP(&ip->ip_src, &xmep->server,
|
||||
sizeof(ip->ip_src)) != 0 ||
|
||||
memcmp(&ip->ip_dst, &xmep->client,
|
||||
UNALIGNED_MEMCMP(&ip->ip_dst, &xmep->client,
|
||||
sizeof(ip->ip_dst)) != 0) {
|
||||
cmp = 0;
|
||||
}
|
||||
break;
|
||||
#ifdef INET6
|
||||
case 6:
|
||||
if (memcmp(&ip6->ip6_src, &xmep->server,
|
||||
if (UNALIGNED_MEMCMP(&ip6->ip6_src, &xmep->server,
|
||||
sizeof(ip6->ip6_src)) != 0 ||
|
||||
memcmp(&ip6->ip6_dst, &xmep->client,
|
||||
UNALIGNED_MEMCMP(&ip6->ip6_dst, &xmep->client,
|
||||
sizeof(ip6->ip6_dst)) != 0) {
|
||||
cmp = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user