net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directive
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in the os-haproxy plugin code that validates the real server “Source address” field and generates its HAProxy server directive; the issue does not name specific files, so search for that field and the source directive. Check how IPv6 literals are recognized and whether the generated value is bracketed. Done when an IPv6 source address passes validation, produces HAProxy’s bracketed form, and the configuration test succeeds.
Written by the indexing model from the issue text.
Description
Describe the bug
Setting an IPv6 address in the "Source address" field of a real server produces a source directive that HAProxy rejects, so the configuration test fails and the service cannot be reloaded.
The plugin writes the address expanded and without brackets. HAProxy treats everything after the last colon as the port.
To Reproduce
- Services → HAProxy → Real Servers: create a server with an IPv6 address (e.g.
fd00:445d:0:4f::eb1, port 443). - Enable advanced mode and set "Source address" to
fd00:445d:0:4f::fe. - Add the server to a backend pool and run the config test.
Generated line:
server hu-web1_HTTPS6 fd00:445d:0:4f::eb1:443 source fd00:445d:0000:004f:0000:0000:0000:00fe send-proxy-v2 check-send-proxy
Result:
[ALERT] config : [/usr/local/etc/haproxy.conf.staging:453] : 'server wp.hmu.com.ar_HTTPS/hu-web1_HTTPS6' : 'source fd00:445d:0000:004f:0000:0000:0000:00fe' : invalid character 'f' in port number '00fe' in 'fd00:445d:0000:004f:0000:0000:0000:00fe'.
[ALERT] config : Fatal errors found in configuration.
Entering the address with brackets ([fd00:445d:0:4f::fe]) is rejected by the form validation ("Please specify a valid source address, i.e. 10.0.0.1 or loadbalancer.example.com:50000…").
Expected behavior
An IPv6 source address should be written in bracketed form, which HAProxy accepts:
source [fd00:445d:0:4f::fe]
Either the template could add the brackets for IPv6 literals, or the field validation could accept bracketed input.
Workaround
Leave "Source address" empty and put source [fd00:445d:0:4f::fe] in the server's "Option pass-through" field. The config test passes with that.
Environment
- OPNsense 26.7.8_2-amd64
- os-haproxy 5.1
- HAProxy 3.2.26-3e0f11a
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 926
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opnsense/plugins
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
opnsense/plugins#5976 · 1 comment ·
Maintainers usually reply within 1 day
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Possibly taken @bringha1 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
q-feeds-connector: "error in configd communication" every update when the Unbound DNSBL rebuild takes longer than 120sPossibly taken @mhatipog claimed this 9 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
All issues in opnsense/plugins
Similar issues
-
15.0
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-php-distro#176 ·
Maintainers usually reply within 2 days
-
No Code Attached Yet
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
joomla/joomla-cms#48941 ·
Maintainers usually reply within 1 day
-
needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug new
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
moodle-an-hochschulen/moodle-theme_boost_union#1500 ·
Maintainers usually reply within 1 day