Skip to content

LMP: Fix hex mask for Verify Transport Mechanism bit check#1422

Open
cuiweixie wants to merge 1 commit intothe-tcpdump-group:masterfrom
cuiweixie:bugfix/hex_prefix
Open

LMP: Fix hex mask for Verify Transport Mechanism bit check#1422
cuiweixie wants to merge 1 commit intothe-tcpdump-group:masterfrom
cuiweixie:bugfix/hex_prefix

Conversation

@cuiweixie
Copy link
Copy Markdown

The bit mask for "Payload test messages capable" was missing the 0x prefix, causing 8000 to be interpreted as decimal instead of hex 0x8000 (bit 15).

The bit mask for "Payload test messages capable" was missing the 0x
prefix, causing 8000 to be interpreted as decimal instead of hex
0x8000 (bit 15).
@infrastation
Copy link
Copy Markdown
Member

Please get a pass from make check before posting the next revision.

@cuiweixie
Copy link
Copy Markdown
Author

Please get a pass from make check before posting the next revision.

master branch will make check failed:

root@ip-172-16-5-97:/data/weixie/tmp/tcpdump# make check
./tests/TESTrun
./tcpdump --fp-type => 1
./tcpdump --time-t-size => 64
Running tests from /data/weixie/tmp/tcpdump/tests
with ./tcpdump, version:
tcpdump version 5.0.0-PRE-GIT
libpcap version 1.9.1 (with TPACKET_V3)
OpenSSL 1.1.1k  FIPS 25 Mar 2021
64-bit build, 64-bit time_t
INFO: This Perl supports threads, using 1 tester thread(s).
INFO: S = skipped, . = passed, F = failed, T = timed out
..........SS..S...S.S.S.S.S.S.S.S.S...FFFF.....................  63 / 797 (  7%)
................................................FFF..FFFFFFFF.. 126 / 797 ( 15%)
............................................................... 189 / 797 ( 23%)
............................................................... 252 / 797 ( 31%)
............................................................... 315 / 797 ( 39%)
............................................................... 378 / 797 ( 47%)
............................................................... 441 / 797 ( 55%)
........................F...................................... 504 / 797 ( 63%)
............................................................... 567 / 797 ( 71%)
............................................................... 630 / 797 ( 79%)
............................................................... 693 / 797 ( 86%)
............................................................... 756 / 797 ( 94%)
.........................................                       797 / 797 (100%)

Skipped tests:
    bgp-aigp-oobr-nossl                     : HAVE_LIBCRYPTO==1
    bgp-as-path-oobr-nossl                  : HAVE_LIBCRYPTO==1
    eapon1                                  : ENABLE_SMB!=1
    eapon1-v                                : ENABLE_SMB!=1
    ipx                                     : ENABLE_SMB!=1
    lmp-v-fptype2                           : fp-type!=2
    nbns-valgrind                           : ENABLE_SMB!=1
    smb_data_print-oobr                     : ENABLE_SMB!=1
    smb_data_print-segv                     : ENABLE_SMB!=1
    smb_print_trans-oobr1                   : ENABLE_SMB!=1
    smb_print_trans-oobr2                   : ENABLE_SMB!=1
    wccp_redirect_gre                       : ENABLE_SMB!=1

Failed tests:
    brcmtag                                 : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/brcm-tag.pcap, link-type 281, snapshot length 262144
tcpdump: unknown data link type 281
    brcmtag-e                               : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/brcm-tag.pcap, link-type 281, snapshot length 262144
tcpdump: unknown data link type 281
    brcmtagprepend                          : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/brcm-tag-prepend.pcap, link-type 282, snapshot length 262144
tcpdump: unknown data link type 282
    dsa                                     : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/dsa.pcap, link-type 284, snapshot length 262144
tcpdump: unknown data link type 284
    dsa-e                                   : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/dsa.pcap, link-type 284, snapshot length 262144
tcpdump: unknown data link type 284
    dsa-high-vid                            : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/dsa-high-vid.pcap, link-type 284, snapshot length 262144
tcpdump: unknown data link type 284
    dsa-high-vid-e                          : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/dsa-high-vid.pcap, link-type 284, snapshot length 262144
tcpdump: unknown data link type 284
    edsa                                    : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/edsa.pcap, link-type 285, snapshot length 262144
tcpdump: unknown data link type 285
    edsa-e                                  : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/edsa.pcap, link-type 285, snapshot length 262144
tcpdump: unknown data link type 285
    edsa-high-vid                           : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/edsa-high-vid.pcap, link-type 285, snapshot length 262144
tcpdump: unknown data link type 285
    edsa-high-vid-e                         : exit code 0x00000100 (dump: 0, code: 1)
reading from file /data/weixie/tmp/tcpdump/tests/edsa-high-vid.pcap, link-type 285, snapshot length 262144
tcpdump: unknown data link type 285
    heap-overflow-2                         : diff exited with 1
--- /data/weixie/tmp/tcpdump/tests/heap-overflow-2.out	2026-03-14 01:32:13.181597654 +0000
+++ /tmp/tcpdump_TESTrun_t7crN23Y/job000-stdout.txt	2026-03-14 01:41:08.959748920 +0000
@@ -1 +1,2 @@
-    1  1995-08-15 05:27:12.999999  [|cip]
+    1  1995-08-15 05:27:12.999999 UNSUPPORTED
+	0x0000:  30                                       0
    time_2038_overflow                      : diff exited with 1
--- /data/weixie/tmp/tcpdump/tests/time_2038_overflow.out	2026-03-14 01:32:13.206597755 +0000
+++ /tmp/tcpdump_TESTrun_t7crN23Y/job000-stdout.txt	2026-03-14 01:41:07.146741668 +0000
@@ -1 +1 @@
-    1  2038-01-19 03:14:08.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
+    1  [timestamp overflow] IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
    time_2039                               : diff exited with 1
--- /data/weixie/tmp/tcpdump/tests/time_2039.out	2026-03-14 01:32:13.206597755 +0000
+++ /tmp/tcpdump_TESTrun_t7crN23Y/job000-stdout.txt	2026-03-14 01:41:07.150741684 +0000
@@ -1 +1 @@
-    1  2039-01-01 00:00:00.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
+    1  [timestamp overflow] IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
    time_2106                               : diff exited with 1
--- /data/weixie/tmp/tcpdump/tests/time_2106.out	2026-03-14 01:32:13.206597755 +0000
+++ /tmp/tcpdump_TESTrun_t7crN23Y/job000-stdout.txt	2026-03-14 01:41:07.155741704 +0000
@@ -1 +1 @@
-    1  2106-01-01 00:00:00.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
+    1  [timestamp overflow] IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
    time_2106_max                           : diff exited with 1
--- /data/weixie/tmp/tcpdump/tests/time_2106_max.out	2026-03-14 01:32:13.206597755 +0000
+++ /tmp/tcpdump_TESTrun_t7crN23Y/job000-stdout.txt	2026-03-14 01:41:07.159741720 +0000
@@ -1 +1 @@
-    1  2106-02-07 06:28:15.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
+    1  [timestamp overflow] IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56

------------------------------------------------
  12 tests skipped
  16 tests failed
 769 tests passed
make: *** [Makefile:431:check] 错误 1

@infrastation
Copy link
Copy Markdown
Member

The additional failures are because libpcap is too old (1.9.1), must be 1.10.5 or newer. Or the current master branch cloned into ../libpcap and built before configuring tcpdump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants