Dns resolver not working without "port" yet no error

Hi,
just discovered this bug with HAProxy 1.6.2:

  • “nameserver” without “port” does not work
  • No error is issued when “port” is missing

I would have expected an error to prevent this misconfiguration.

Cheers,
Erez

Hi!

You’re absolutely right.
I’m going to fix this and prevent such configuration to run.

Later, we could also simply say that if no ports are configured, then the default DNS port (53) will be used if none are provided by the configuration.
What do you think about it?

Patch written and sent to Willy for integration.

:+1: sounds excellent. Thanks for the quick response!

Patch applied to -dev.
Should be merged in 1.6 sometime :slightly_smiling: