[openssl/openssl] ce41a5: Fix tests when configured with -DOPENSSL_USE_IPV6=0

Tom Cosgrove noreply at github.com
Mon Sep 12 06:30:50 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: ce41a53dc647184119876fee53afef66be6c7f4b
      https://github.com/openssl/openssl/commit/ce41a53dc647184119876fee53afef66be6c7f4b
  Author: Tom Cosgrove <tom.cosgrove at arm.com>
  Date:   2022-09-12 (Mon, 12 Sep 2022)

  Changed paths:
    M test/bio_dgram_test.c

  Log Message:
  -----------
  Fix tests when configured with -DOPENSSL_USE_IPV6=0

In include/internal/sockets.h it says that you can disable IPv6, and only
defines OPENSSL_USE_IPV6 (to 0 or 1) if it's not already defined.

The codebase generally then checks `#if OPENSSL_USE_IPV6`.

However, test_bio_dgram uses `#if defined(OPENSSL_USE_IPV6)` which means it tries
to test IPv6 even if it's explicitly configured out with -DOPENSSL_USE_IPV6=0
(`#if defined(OPENSSL_USE_IPV6)` is always true).

This fixes that.

Change-Id: Ie1641c9dd654f27f3bdca186517df5599ad1059b

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19181)




More information about the openssl-commits mailing list