|
|
302b22 |
From f968f649e7e57eb097fb766be805a2d976d2dcc6 Mon Sep 17 00:00:00 2001
|
|
|
302b22 |
From: Petr Mensik <pemensik@redhat.com>
|
|
|
302b22 |
Date: Wed, 27 Nov 2019 16:06:12 +0100
|
|
|
302b22 |
Subject: [PATCH] Disable listening on IPV6 by default
|
|
|
302b22 |
|
|
|
302b22 |
If configuration file does not mention listen-on-v6, for backward
|
|
|
302b22 |
compatibility assume none; Upstream changed default value to any; but
|
|
|
302b22 |
previous RHEL7 version did not have it.
|
|
|
302b22 |
---
|
|
|
302b22 |
bin/named/server.c | 4 +++-
|
|
|
302b22 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
302b22 |
|
|
|
302b22 |
diff --git a/bin/named/server.c b/bin/named/server.c
|
|
|
302b22 |
index 93f9417..eac467f 100644
|
|
|
302b22 |
--- a/bin/named/server.c
|
|
|
302b22 |
+++ b/bin/named/server.c
|
|
|
302b22 |
@@ -7781,11 +7781,13 @@ load_configuration(const char *filename, ns_server_t *server,
|
|
|
302b22 |
ns_g_mctx, AF_INET6,
|
|
|
302b22 |
&listenon);
|
|
|
302b22 |
} else if (!ns_g_lwresdonly) {
|
|
|
302b22 |
+ isc_boolean_t enable;
|
|
|
302b22 |
/*
|
|
|
302b22 |
* Not specified, use default.
|
|
|
302b22 |
*/
|
|
|
302b22 |
+ enable = ISC_TF(isc_net_probeipv4() != ISC_R_SUCCESS);
|
|
|
302b22 |
CHECK(ns_listenlist_default(ns_g_mctx, listen_port,
|
|
|
302b22 |
- -1, ISC_TRUE, &listenon));
|
|
|
302b22 |
+ -1, enable, &listenon));
|
|
|
302b22 |
}
|
|
|
302b22 |
if (listenon != NULL) {
|
|
|
302b22 |
ns_interfacemgr_setlistenon6(server->interfacemgr,
|
|
|
302b22 |
--
|
|
|
302b22 |
2.20.1
|
|
|
302b22 |
|