summaryrefslogtreecommitdiff
path: root/print-rx.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-25 16:18:10 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-26 18:56:47 +0100
commit4154778a262b4a7449141535a99da4d13b4c8b2e (patch)
treec6df65fbbbb4739a659665e8c0d0e942bb4887a5 /print-rx.c
parent8d35d758923b0f0cab625255995c682e7b1d2fd2 (diff)
downloadtcpdump-4154778a262b4a7449141535a99da4d13b4c8b2e.tar.gz
RX: Fix a data fetch
The serviceId field is 2 bytes long, therefore use EXTRACT_BE_U_2 to fetch it.
Diffstat (limited to 'print-rx.c')
-rw-r--r--print-rx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-rx.c b/print-rx.c
index 5e0315ef..b0aadac7 100644
--- a/print-rx.c
+++ b/print-rx.c
@@ -701,7 +701,7 @@ rx_cache_insert(netdissect_options *ndo,
UNALIGNED_MEMCPY(&rxent->client, ip->ip_src, sizeof(uint32_t));
UNALIGNED_MEMCPY(&rxent->server, ip->ip_dst, sizeof(uint32_t));
rxent->dport = dport;
- rxent->serviceId = EXTRACT_BE_U_4(rxh->serviceId);
+ rxent->serviceId = EXTRACT_BE_U_2(rxh->serviceId);
rxent->opcode = EXTRACT_BE_U_4(bp + sizeof(struct rx_header));
}
@@ -732,7 +732,7 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, u_int sport,
if (rxent->callnum == EXTRACT_BE_U_4(rxh->callNumber) &&
rxent->client.s_addr == clip &&
rxent->server.s_addr == sip &&
- rxent->serviceId == EXTRACT_BE_U_4(rxh->serviceId) &&
+ rxent->serviceId == EXTRACT_BE_U_2(rxh->serviceId) &&
rxent->dport == sport) {
/* We got a match! */