diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-03-05 20:37:24 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-03-05 20:51:43 +0100 |
commit | 83e03c4fc23dae0cbb3fd4e7c2f9ef533fc26160 (patch) | |
tree | c845bc8964a79188bbe4a97efb94368f7adb5960 /src/test | |
parent | 571ec995fe035557d4166ae310f627bdf307714b (diff) | |
download | systemd-83e03c4fc23dae0cbb3fd4e7c2f9ef533fc26160.tar.gz |
socket-util: add helper for checking if IPv6 is enabled
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-socket-util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index 4ff7d714f8..584253c2fc 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -504,6 +504,11 @@ static void test_flush_accept(void) { assert_se(flush_accept(listen_seqpacket) >= 0); } +static void test_ipv6_enabled(void) { + log_info("IPv6 supported: %s", yes_no(socket_ipv6_is_supported())); + log_info("IPv6 enabled: %s", yes_no(socket_ipv6_is_enabled())); +} + int main(int argc, char *argv[]) { test_setup_logging(LOG_DEBUG); @@ -519,6 +524,7 @@ int main(int argc, char *argv[]) { test_send_nodata_nofd(); test_send_emptydata(); test_flush_accept(); + test_ipv6_enabled(); return 0; } |