]> The Tcpdump Group git mirrors - tcpdump/commitdiff
PTP: Fix header field 'Port Identity' variable size
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 28 Feb 2020 17:21:59 +0000 (18:21 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 28 Feb 2020 20:23:02 +0000 (21:23 +0100)
'Port Identity' size is 16 bits, thus use uint16_t type.

print-ptp.c

index 01ce53fd4adebd0decdaccd1d2b2ad26c4f29232..27a964387b1f0d5ea772885f8d1df0ae3a80c622 100644 (file)
@@ -343,8 +343,8 @@ ptp_print_1(netdissect_options *ndo)
 static void ptp_print_2(netdissect_options *ndo, const u_char *bp, u_int length)
 {
     u_int len = length;
-    uint16_t msg_len, flags, seq_id;
-    uint8_t foct, domain_no, msg_type, v1_compat, rsvd1, port_id, lm_int, control;
+    uint16_t msg_len, flags, port_id, seq_id;
+    uint8_t foct, domain_no, msg_type, v1_compat, rsvd1, lm_int, control;
     uint32_t ns_corr, sns_corr, rsvd2;
     uint64_t clk_id;