]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Set the listening port through the options-level port statement
authorNicki Křížek <nicki@isc.org>
Thu, 23 Jul 2026 16:31:01 +0000 (16:31 +0000)
committerNicki Křížek <nicki@isc.org>
Thu, 6 Aug 2026 11:50:09 +0000 (13:50 +0200)
Some instances configured the assigned port only as a listen-on
qualifier. Where the file had no options-level port at all, that also
left named's default destination port for queries, notifies, and
transfers at 53 — on the test network every instance runs on the
assigned port, so this only worked for setups that never needed to
reach another instance. Set `port @PORT@;` at options level and use
plain listen-on statements; files with a deliberate non-standard port
statement (dns64's and notify/ns4's dual-port setups) are skipped.

Assisted-by: Claude:claude-fable-5
30 files changed:
bin/tests/system/ede24/ns1/named.conf.j2
bin/tests/system/ede24/ns2/named.conf.j2
bin/tests/system/masterformat/ns1/named.conf.j2
bin/tests/system/masterformat/ns2/named.conf.j2
bin/tests/system/masterformat/ns3/named.conf.j2
bin/tests/system/masterformat/ns4/named.conf.j2
bin/tests/system/masterformat/ns4/named2.conf.j2
bin/tests/system/proxy/ns1/named.conf.j2
bin/tests/system/proxy/ns3/named.conf.j2
bin/tests/system/redirect/ns10/named.conf.j2
bin/tests/system/redirect/ns5/named.conf.j2
bin/tests/system/redirect/ns6/named.conf.j2
bin/tests/system/redirect/ns7/named.conf.j2
bin/tests/system/redirect/ns8/named.conf.j2
bin/tests/system/redirect/ns9/named.conf.j2
bin/tests/system/transport_acl/ns1/named.conf.j2
bin/tests/system/transport_change/ns1/named-http-plain-proxy.conf.j2
bin/tests/system/transport_change/ns1/named-http-plain.conf.j2
bin/tests/system/transport_change/ns1/named-https-proxy-encrypted.conf.j2
bin/tests/system/transport_change/ns1/named-https-proxy-plain.conf.j2
bin/tests/system/transport_change/ns1/named-https.conf.j2
bin/tests/system/transport_change/ns1/named-proxy.conf.j2
bin/tests/system/transport_change/ns1/named-tls-proxy-encrypted.conf.j2
bin/tests/system/transport_change/ns1/named-tls-proxy-plain.conf.j2
bin/tests/system/transport_change/ns1/named-tls.conf.j2
bin/tests/system/transport_change/ns1/named.conf.j2
bin/tests/system/xfer_servers_list/ns1/named.conf.j2
bin/tests/system/xfer_servers_list/ns2/named.conf.j2
bin/tests/system/xfer_servers_list/ns3/named.conf.j2
bin/tests/system/xfer_servers_list/ns4/named.conf.j2

index a4e69dc453e08648218b6fea0d27f2377537b063..7b530d3174e9f7157ee5ad43fef14cdf8e773919 100644 (file)
@@ -1,6 +1,7 @@
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        recursion no;
index 368015265154ed7bcd993d1711afcfd1517b72dc..ad1fac2f654c15209db7cdda3d199b04c483761e 100644 (file)
@@ -1,7 +1,8 @@
 options {
+       port @PORT@;
        query-source address 10.53.0.2;
        notify-source 10.53.0.2;
-       listen-on port @PORT@ { 10.53.0.2; };
+       listen-on { 10.53.0.2; };
        transfer-source 10.53.0.2;
        pid-file "named.pid";
        recursion no;
index 5ff1ecf4002690c5126dd086613d130f9199cf5e..3d4f4538af2310adf4497fdaa8c22058a4928371 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        port @PORT@;
        listen-on-v6 { none; };
        recursion no;
index 65b81e6ac6367d95e5ed183e874bf4843556f133..5f35b8c58af6cc8573a850480b12055e60da9e68 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.2;
        transfer-source 10.53.0.2;
        pid-file "named.pid";
-       listen-on port @PORT@ { 10.53.0.2; };
+       listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
        port @PORT@;
        recursion no;
index be8d5f97127d68da9db2191ba61abbf36f85fb7c..77ab423e7dc1b0207f5a3209b2fc84e9386bcd1e 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
        pid-file "named.pid";
-       listen-on port @PORT@ { 10.53.0.3; };
+       listen-on { 10.53.0.3; };
        port @PORT@;
        listen-on-v6 { none; };
        recursion no;
index 7f600e964b9cc0f17af6a941ca690dd8ba6c5d89..f10a44f90e2f9c4be01cfc4a60578a803b445c3b 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
        pid-file "named.pid";
-       listen-on port @PORT@ { 10.53.0.4; };
+       listen-on { 10.53.0.4; };
        port @PORT@;
        listen-on-v6 { none; };
        recursion no;
index 2d51f97dd0b691cda010b306ed9cec8a1e138f00..8c41db2db995ab7138fb41ac4eefd2924bede092 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
        pid-file "named.pid";
-       listen-on port @PORT@ { 10.53.0.4; };
+       listen-on { 10.53.0.4; };
        port @PORT@;
        listen-on-v6 { none; };
        recursion no;
index 6191e484800c0deec71be853bb7b39de44abb33d..3a7464d559db8d4630536b7133a3b5175612fa7b 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic test
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
 
        listen-on port @EXTRAPORT1@ proxy plain { 10.53.0.1; };
        listen-on port @EXTRAPORT1@ proxy plain { 10.53.0.2; };
index d9b38ad71124c7e3d746957ed41555669fb51502..c8a40314ef3d06b830dde1eaf1eef403af814f63 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
        pid-file "named.pid";
        ##
        # generic test
-       listen-on port @PORT@ { 10.53.0.3; };
+       listen-on { 10.53.0.3; };
 
        listen-on port @EXTRAPORT1@ proxy plain { 10.53.0.3; };
        listen-on port @TLSPORT@ proxy encrypted tls self-signed { 10.53.0.3; };
index 029d7acfc0990a7f32843cf2ac58e7628b1fd482..d33395ae883d03366b0acc23c664e818209699d0 100644 (file)
@@ -7,7 +7,7 @@ options {
        notify-source 10.53.0.10;
        transfer-source 10.53.0.10;
        port @PORT@;
-       listen-on port @PORT@ { 10.53.0.10; };
+       listen-on { 10.53.0.10; };
        pid-file "named.pid";
        nxdomain-redirect redirect;
        dnssec-validation yes;
index 7f101097f4787fdd0ab0a7715535e61927bbec47..60b7a17f49a411b9e3d42235f6b13aa8bb5259c4 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.5;
        transfer-source 10.53.0.5;
        port @PORT@;
-       listen-on port @PORT@ { 10.53.0.5; };
+       listen-on { 10.53.0.5; };
        pid-file "named.pid";
        nxdomain-redirect signed;
        dnssec-validation no;
index 539f4b332b0600377b3df8bc3b84b3e3276cd53b..7f99d5567de59734a7f457b012904705f4823859 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
        port @PORT@;
-       listen-on port @PORT@ { 10.53.0.6; };
+       listen-on { 10.53.0.6; };
        pid-file "named.pid";
        nxdomain-redirect unsigned;
        dnssec-validation no;
index f0f7c1cc4747c066f8d0f2f90c8b2029aa4f4868..46af5b6bd02f2347ab5dbf11bd8d678cee93716a 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
        port @PORT@;
-       listen-on port @PORT@ { 10.53.0.7; };
+       listen-on { 10.53.0.7; };
        pid-file "named.pid";
        nxdomain-redirect redirect;
        dnssec-validation no;
index 0b8939aa873141b23c9c0967812cd6aee6755924..3ba4abf80424779f39f7b7492daecdec0d1307e4 100644 (file)
@@ -5,7 +5,7 @@ options {
        notify-source 10.53.0.8;
        transfer-source 10.53.0.8;
        port @PORT@;
-       listen-on port @PORT@ { 10.53.0.8; };
+       listen-on { 10.53.0.8; };
        pid-file "named.pid";
        nxdomain-redirect redirect;
        dnssec-validation no;
index 8f5f038d24695c6494b30c65a44745bad728f401..0488abce1a9d8bf7c8d5b534685f86634ffc7292 100644 (file)
@@ -6,7 +6,7 @@ options {
        notify-source 10.53.0.9;
        transfer-source 10.53.0.9;
        port @PORT@;
-       listen-on port @PORT@ { 10.53.0.9; };
+       listen-on { 10.53.0.9; };
        pid-file "named.pid";
        dnssec-validation no;
        recursion no;
index 7d849e99a3342e470f9700a1b3b1b5654fffab7d..ffc083e2c89b482977009891c6bc686e28398a12 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic test
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        listen-on port @TLSPORT@ tls self-signed { 10.53.0.1; };
        # test #1
        listen-on port @EXTRAPORT1@ { 10.53.0.1; };
index 4e6d9cc7e888246fe5b77a611b7a1b8169c2a477..b9481dd72c881b6a8b63d899e659040f881d2c6e 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ proxy plain tls none http default { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ proxy plain tls none http default { fd92:7065:b8e:ffff::1; };
index fd8037cc8bc91b42f12a53433327fe3de5c7980f..bdd3057264282d8c8a31618a9b0ec39f6da4151d 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ tls none http default { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ tls none http default { fd92:7065:b8e:ffff::1; };
index 2a3e1bf4940efacbf1d9adbdc5720cee0493721a..fb0bfba7eb07cf6e7f66a202fdd9155b66bb4cfa 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ proxy encrypted tls self-signed http default { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ proxy encrypted tls self-signed http default { fd92:7065:b8e:ffff::1; };
index c0a87c6d92eb2b0a40cbad9d2a5ac910cb9aabe6..a6cb487c53723b4c10bbd0f2089e0fe0443e76fd 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ proxy plain tls self-signed http default { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ proxy plain tls self-signed http default { fd92:7065:b8e:ffff::1; };
index 0714ea7a9dab0cecbb7dde0b62e98fad84860eba..249e8cbdb862d950d2920c24337c531bf22cd58c 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ tls self-signed http default { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ tls self-signed http default { fd92:7065:b8e:ffff::1; };
index aaccae2fcbd0d406d1826bb2b5edfcf8d5c6d90f..e3ea33fa297ffc94fd4e336da37f4f6757f81cc4 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test
        listen-on port @EXTRAPORT1@ proxy plain { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ proxy plain { fd92:7065:b8e:ffff::1; };
index 5f48b865d0dca12b2091a37bf400024eee5cd9eb..eba0d795c77e5e038a8e9c2e0e46e24bd6dfeb95 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ proxy encrypted tls self-signed { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ proxy encrypted tls self-signed { fd92:7065:b8e:ffff::1; };
index 6e44d99de4adf43ae0cee2bfb3a9259ef8003b8f..453bb9a1bb820dd8c3b0d330f85eb828ab369925 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ proxy plain tls self-signed { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ proxy plain tls self-signed { fd92:7065:b8e:ffff::1; };
index 1152598f0fe02be34ac2bda182dd6579bcd7a8d6..3a7983855268fc793280123a7b62827acaf8c712 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test TLS
        listen-on port @EXTRAPORT1@ tls self-signed { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ tls self-signed { fd92:7065:b8e:ffff::1; };
index 42b94f67851abdfb85fdc300394a0b65ac3e4050..943596faba199402d63707da5174634808e8c966 100644 (file)
@@ -6,13 +6,14 @@ tls self-signed {
 };
 
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        ##
        # generic
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        # test
        listen-on port @EXTRAPORT1@ { 10.53.0.1; };
        listen-on-v6 port @EXTRAPORT1@ { fd92:7065:b8e:ffff::1; };
index 223e0e6f1b7d2ad3fe15cfe4921fa8119d48ca04..4f1dbdc372d8fd5129f5989eda2436891c0a22c6 100644 (file)
@@ -1,6 +1,7 @@
 options {
+       port @PORT@;
        query-source address 10.53.0.1;
-       listen-on port @PORT@ { 10.53.0.1; };
+       listen-on { 10.53.0.1; };
        transfer-source 10.53.0.1;
        pid-file "named.pid";
        recursion no;
index 618958e6be7423780f8e7211ad54c49d437645d8..9be27c0c7d8ce2f50c2fab6fcc3224ed50731061 100644 (file)
@@ -1,7 +1,8 @@
 options {
+       port @PORT@;
        query-source address 10.53.0.2;
        notify-source 10.53.0.2;
-       listen-on port @PORT@ { 10.53.0.2; };
+       listen-on { 10.53.0.2; };
        transfer-source 10.53.0.2;
        pid-file "named.pid";
        recursion no;
index 96094ee126534197ed76e614978d5a2a90fba23c..4e5b928c13035d179e82eb0db8ce22a5f8a661ad 100644 (file)
@@ -1,7 +1,8 @@
 options {
+       port @PORT@;
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
-       listen-on port @PORT@ { 10.53.0.3; };
+       listen-on { 10.53.0.3; };
        transfer-source 10.53.0.3;
        pid-file "named.pid";
        recursion no;
index f7b750328c72b608156deac64b8e30286dd66cd0..6d7d29057b73a1241ef4684a7fd5a3de01967670 100644 (file)
@@ -1,7 +1,8 @@
 options {
+       port @PORT@;
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
-       listen-on port @PORT@ { 10.53.0.4; };
+       listen-on { 10.53.0.4; };
        transfer-source 10.53.0.4;
        pid-file "named.pid";
        recursion no;