Commit 94df94b470 for openssl.org

commit 94df94b4708b06bfe175522c931eb5d68161daaf
Author: Eugene Syromiatnikov <esyr@openssl.org>
Date:   Fri Oct 30 05:30:25 2026 +0100

    Rename the pcap config option to dgram-pair-pcap

    "pcap" is quite a generic option name, while in reality it controls
    pretty specific and narrow functionality.  Rename it to signify
    that it is related to dgram pair only.

    Complements: 6cbb3f950a5f "allow dgram pair to dump datagrams into libpcapp"
    Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
    Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
    Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
    Merge-date: Tue Nov  3 13:16:57 2026
    Merged-from: https://github.com/openssl/openssl/pull/33452

diff --git a/.github/workflows/run-checker-daily.yml b/.github/workflows/run-checker-daily.yml
index e278c6a95e..6a422a49ef 100644
--- a/.github/workflows/run-checker-daily.yml
+++ b/.github/workflows/run-checker-daily.yml
@@ -86,6 +86,7 @@ jobs:
           enable-demos,
           no-deprecated,
           no-des,
+          enable-dgram-pair-pcap,
           no-docs,
           no-dsa,
           no-dtls1,
@@ -120,7 +121,6 @@ jobs:
           no-multiblock,
           no-nextprotoneg,
           no-ocb,
-          no-pcap,
           no-pic,
           no-poly1305,
           no-posix-io,
@@ -167,7 +167,6 @@ jobs:
           no-x942kdf,
           no-x963kdf,
           enable-zlib-dynamic,
-          enable-pcap,
           -DOPENSSL_PEDANTIC_ZEROIZATION,
           -DOPENSSL_PEDANTIC_ZEROIZATION enable-fips,
           -DOPENSSL_NO_BUILTIN_OVERFLOW_CHECKING,
diff --git a/CHANGES.md b/CHANGES.md
index 92c2c4ebdd..3cd8a334f7 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -36,7 +36,7 @@ OpenSSL 4.2
  * Added `BIO_dgram_pair_set0_pcap_file()` which intercepts and writes UDP
    datagrams exchanged of over `BIO_dgram_pair` bio memory object to file
    in libpcap format. To enable `BIO_dgram_pair_set0_pcap_file()` the build
-   must be configured with `enable-pcap` option.
+   must be configured with `enable-dgram-pair-pcap` option.
    <!-- https://github.com/openssl/openssl/pull/32266 -->

    *Alexandr Nedvedicky*
diff --git a/Configure b/Configure
index 6c3ea33623..7273534c78 100755
--- a/Configure
+++ b/Configure
@@ -533,6 +533,7 @@ my @disablables_features = (
     "h3demo",
     "hqinterop",
     "deprecated",
+    "dgram-pair-pcap",
     "docs",
     "dso",
     "ech",
@@ -561,7 +562,6 @@ my @disablables_features = (
     "pinshared",
     "posix-io",
     "unstable-qlog",
-    "pcap",
     "rdrand",
     "rfc3779",
     "secure-memory",
@@ -635,6 +635,7 @@ our %disabled = ( # "what"         => "comment"
                   "allocfail-tests"     => "default",
                   "ct-validation"       => "default",
                   "demos"               => "default",
+                  "dgram-pair-pcap"     => "default",
                   "h3demo"              => "default",
                   "hqinterop"           => "default",
                   "ec_explicit_curves" => "default",
@@ -651,7 +652,6 @@ our %disabled = ( # "what"         => "comment"
                   "md2"                 => "default",
                   "msan"                => "default",
                   "rc5"                 => "default",
-                  "pcap"                => "default",
                   "sctp"                => "default",
                   "sslkeylog"           => "default",
                   "static-vcruntime"    => "default",
diff --git a/crypto/bio/bss_dgram_pair.c b/crypto/bio/bss_dgram_pair.c
index d85e42604c..9894bb5509 100644
--- a/crypto/bio/bss_dgram_pair.c
+++ b/crypto/bio/bss_dgram_pair.c
@@ -14,7 +14,7 @@
 #include "internal/safe_math.h"
 #include "internal/threads_common.h"

-#ifndef OPENSSL_NO_PCAP
+#ifndef OPENSSL_NO_DGRAM_PAIR_PCAP
 #include <openssl/rand.h>
 #include <stdio.h>

@@ -316,7 +316,7 @@ struct bio_dgram_peer_st {
      * indexed one per direction.
      */
     struct rbuf_map_st map[2];
-#ifndef OPENSSL_NO_PCAP
+#ifndef OPENSSL_NO_DGRAM_PAIR_PCAP
     FILE *tcpdump_f;
     CRYPTO_MUTEX *pcap_mutex;
     uint16_t ip_id;
@@ -604,7 +604,7 @@ static int dgram_pair_ctrl_set_pcap_file(BIO *bio, void *ptr)
 {
     int ret = 0;

-#ifndef OPENSSL_NO_PCAP
+#ifndef OPENSSL_NO_DGRAM_PAIR_PCAP
 #define LINKTYPE_IPV4 0x00e4 /* IANA type */
     struct bio_dgram_pair_st *bp;
     char *filename = (char *)ptr;
@@ -689,7 +689,7 @@ static int dgram_pair_ctrl_destroy_bio_pair(BIO *bio1)
         CRYPTO_THREAD_lock_free(b1->pair->peerlock);
         ring_buf_destroy(&b1->pair->map[0].rbuf);
         ring_buf_destroy(&b1->pair->map[1].rbuf);
-#ifndef OPENSSL_NO_PCAP
+#ifndef OPENSSL_NO_DGRAM_PAIR_PCAP
         if (b1->pair->tcpdump_f != NULL) {
             fclose(b1->pair->tcpdump_f);
             ossl_crypto_mutex_free(&b1->pair->pcap_mutex);
@@ -1530,7 +1530,7 @@ static ossl_inline size_t compute_rbuf_growth(size_t target, size_t current)
     return current;
 }

-#ifndef OPENSSL_NO_PCAP
+#ifndef OPENSSL_NO_DGRAM_PAIR_PCAP
 static void dgram_pcap(struct bio_dgram_pair_st *b, const char *buf, size_t sz)
 {
     struct {
@@ -1728,7 +1728,7 @@ static ossl_ssize_t dgram_pair_write_actual(BIO *bio, const char *buf, size_t sz
         return -BIO_R_NON_FATAL;
     }

-#ifndef OPENSSL_NO_PCAP
+#ifndef OPENSSL_NO_DGRAM_PAIR_PCAP
     dgram_pcap(b, buf, sz);
 #endif

diff --git a/doc/man3/BIO_s_dgram_pair.pod b/doc/man3/BIO_s_dgram_pair.pod
index 1596fd907b..44e3b29364 100644
--- a/doc/man3/BIO_s_dgram_pair.pod
+++ b/doc/man3/BIO_s_dgram_pair.pod
@@ -119,7 +119,7 @@ the BIO is freed.
 BIO_dgram_pair_set0_pcap_file() creates a packet capture file with desired filename
 and writes all packets transmitted over BIO dgram pair. The file is truncated
 if it exists already. To enable the feature you must configure your OpenSSL
-library build with B<enable-pcap> option.
+library build with B<enable-dgram-pair-pcap> option.

 L<BIO_flush(3)> is a no-op.