From 4154778a262b4a7449141535a99da4d13b4c8b2e Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Mon, 25 Mar 2019 16:18:10 +0100 Subject: RX: Fix a data fetch The serviceId field is 2 bytes long, therefore use EXTRACT_BE_U_2 to fetch it. --- print-rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'print-rx.c') 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! */ -- cgit v1.2.1