]> The Tcpdump Group git mirrors - libpcap/commit
Get DLT_MATCHING_MAX right in gencode.c on NetBSD.
authorDenis Ovsienko <[email protected]>
Fri, 12 Mar 2021 17:30:08 +0000 (17:30 +0000)
committerDenis Ovsienko <[email protected]>
Fri, 12 Mar 2021 17:30:08 +0000 (17:30 +0000)
commitbb02779a37fdf815da58e8828eb4ce99a4f86580
treef46a4066a2c96071546f09d5c9ab7e288336f8cf
parent32962b021d875978a70bfd91e9687684712f608f
Get DLT_MATCHING_MAX right in gencode.c on NetBSD.

Even though libpcap had DLT_MATCHING_MAX defined to 290 in its
"pcap/dlt.h" header, on NetBSD 9.1 gencode.c ended up with the value 275
from /usr/include/net/dlt.h (regardless if the libpcap package, which
defined it as 276 in /usr/pkg/include/pcap/dlt.h, was installed).

This made the current master branch of tcpdump compiled with the current
master branch of libpcap fail some tests, such as:

tcpdump: unknown data link type 284

Move the HAVE_NET_PFVAR_H block and add a comment. This solves the
problem on NetBSD and does not introduce any immediate regressions on
FreeBSD 13.0, Linux or Solaris 11.
gencode.c