summaryrefslogtreecommitdiff
path: root/print-ptp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-04-20 19:44:37 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-04-20 19:44:37 +0200
commit61652a42a0a55c7fd1f098e2f4f285b476839498 (patch)
tree9e3142cc7e2e006fbd03bb21d7e3fcdfbe3ad4bf /print-ptp.c
parenta0c4cf16e74e3862894a0bf530738228981ab5ff (diff)
downloadtcpdump-61652a42a0a55c7fd1f098e2f4f285b476839498.tar.gz
PTP: Fix fetching the domainNumber
Diffstat (limited to 'print-ptp.c')
-rw-r--r--print-ptp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-ptp.c b/print-ptp.c
index 6f762dc7..36001c10 100644
--- a/print-ptp.c
+++ b/print-ptp.c
@@ -358,7 +358,7 @@ static void ptp_print_2(netdissect_options *ndo, const u_char *bp, u_int length)
len -= 2; bp += 2; msg_len = GET_BE_U_2(bp); ND_PRINT(", length : %u", msg_len);
/* domain */
- len -= 2; bp += 2; domain_no = GET_BE_U_2(bp) & PTP_DOMAIN_MASK; ND_PRINT(", domain : %u", domain_no);
+ len -= 2; bp += 2; domain_no = (GET_BE_U_2(bp) & PTP_DOMAIN_MASK) >> 8; ND_PRINT(", domain : %u", domain_no);
/* rsvd 1*/
rsvd1 = GET_BE_U_2(bp) & PTP_RSVD1_MASK;