Opened 9 years ago

Closed 4 years ago

Last modified 4 years ago

#570 closed Bug / Defect (worksforme)

Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:4: register-dns (2.3.6)

Reported by: hildeb Owned by:
Priority: minor Milestone:
Component: Configuration Version: OpenVPN 2.3.6 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: config register-dns
Cc:

Description

On non-windows clients, one is getting the error message:

Options error: Unrecognized option or missing parameter(s) in
[PUSH-OPTIONS]:4: register-dns (2.3.6)

when "register-dns" is being used.

The rationale behind this setting is to workaround DNS problems on windows clients. It would be nice if:

a) The error could be downgraded to a warning (since the option is valid, albeit not implemented - and openvpn continues to work)

b) If there would be a stub in the (non-windows)-client. i.e. the option should simply be ignored

Principle of least surprise and all that...

Change History (6)

comment:1 Changed 8 years ago by Naatan

retracted

Last edited 8 years ago by Naatan (previous) (diff)

comment:2 Changed 8 years ago by Gert Döring

on push, this is only a warning.

Alternatively, there's the "setenv opt " prefix which can be put in front of possibly-unknown options to turn the error into a warning.

Not perfect, but a workaround.

comment:3 Changed 4 years ago by tct

Server always does --push "register-dns" to non-windows client results in:

  • Client is not prepared for unknown options:

Client always ignores unknown options pushed from the server.

Error is ignored as non-fatal.

Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:2: register-dns (2.5_git)
  • Client uses: --pull-filter ignore "register-dns":

Client ignores pushed option --register-dns.

No Error is thrown.

Pushed option removed by filter: 'register-dns'

Solution: Add this to your client profile:

pull-filter ignore "register-dns"

Or prepare your server to not push the wrong options by identifying your client OS from data pushed by the client on connect. (See: --push-peer-info in the manual)

comment:4 Changed 4 years ago by Gert Döring

Resolution: worksforme
Status: newclosed

comment:5 Changed 4 years ago by David Sommerseth

Client configs can also use setenv FORWARD_COMPATIBLE 1. From the man page:

       --setenv FORWARD_COMPATIBLE 1
              Relax  config  file  syntax  checking so that unknown directives
              will trigger a warning but not a fatal error, on the  assumption
              that  a given unknown directive might be valid in future OpenVPN
              versions.

Another alternative is to use ignore-unknown-option register-dns. From the man page:

      --ignore-unknown-option opt1 opt2 opt3 ... optN
              When one of options opt1 ... optN is encountered in the configu‐
              ration file the configuration file parsing does not fail if this
              OpenVPN   version   does   not   support  the  option.  Multiple
              --ignore-unknown-option options can be given to support a larger
              number of options to ignore.

comment:6 Changed 4 years ago by tct

There is one final option:

  • setenv opt register-dns

Use this in a client config and the client will only use --register-dns
if it knows how to. Then do not push --register-dns.

Last edited 4 years ago by tct (previous) (diff)
Note: See TracTickets for help on using tickets.