summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-29 22:49:00 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-05-30 11:48:12 +0000
commit8754f486acf64b1b1bfa3901f36229b713d4d573 (patch)
tree4092d6822d6d050caf7d225aff7bf9dcd673019e
parent16235b2037af1941b4bb808fde1399692a4eab12 (diff)
downloadvyos-1x-8754f486acf64b1b1bfa3901f36229b713d4d573.tar.gz
vyos-1x-8754f486acf64b1b1bfa3901f36229b713d4d573.zip
reverse-proxy: T5231: better mark v4v6 listen any address
haproxy supports both ":::80 v4v6" and "[::]:80 v4v6" as listen statement, where the later one is more humand readable. Both act in the same way. (cherry picked from commit a2f0b25452c67528077f343d75de09d038e97fee)
-rw-r--r--data/templates/load-balancing/haproxy.cfg.j22
-rwxr-xr-xsmoketest/scripts/cli/test_load-balancing_reverse-proxy.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/load-balancing/haproxy.cfg.j2 b/data/templates/load-balancing/haproxy.cfg.j2
index 797bf17e7..b786a58f8 100644
--- a/data/templates/load-balancing/haproxy.cfg.j2
+++ b/data/templates/load-balancing/haproxy.cfg.j2
@@ -62,7 +62,7 @@ frontend {{ front }}
bind {{ address | bracketize_ipv6 }}:{{ front_config.port }} {{ ssl_directive }} {{ ssl_front | join(' ') }}
{% endfor %}
{% else %}
- bind :::{{ front_config.port }} v4v6 {{ ssl_directive }} {{ ssl_front | join(' ') }}
+ bind [::]:{{ front_config.port }} v4v6 {{ ssl_directive }} {{ ssl_front | join(' ') }}
{% endif %}
{% if front_config.redirect_http_to_https is vyos_defined %}
http-request redirect scheme https unless { ssl_fc }
diff --git a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
index 370a9276a..2b2f93cdf 100755
--- a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
+++ b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
@@ -218,7 +218,7 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
# Frontend
self.assertIn(f'frontend {frontend}', config)
- self.assertIn(f'bind :::{front_port} v4v6', config)
+ self.assertIn(f'bind [::]:{front_port} v4v6', config)
self.assertIn(f'mode {mode}', config)
for domain in domains_bk_first:
self.assertIn(f'acl {rule_ten} hdr(host) -i {domain}', config)
@@ -371,7 +371,7 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
# Frontend
self.assertIn(f'frontend {frontend}', config)
- self.assertIn(f'bind :::{front_port} v4v6', config)
+ self.assertIn(f'bind [::]:{front_port} v4v6', config)
self.assertIn(f'mode {mode}', config)
self.assertIn(f'tcp-request inspect-delay {tcp_request_delay}', config)