Opened 8 years ago

Closed 2 years ago

#291 closed Feature Wish (fixed)

Overriding a pushed "route" in the client's config throws an error

Reported by: Simon Deziel Owned by: Samuli Seppänen
Priority: trivial Milestone: release 2.3.7
Component: Configuration Version: OpenVPN 2.2.2 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:


When connecting to server that pushes routes using this:


  # Pushed routes
  push "route"

and when the client overrides them in its config:


  # Options
  route-metric 50

This works but the client's log have this:

  Options error: option 'route' cannot be used in this context

This is explained by Jan Just Keijser:

the warning message is printed because the vpn server is pushing two routes, which the
client is now ignoring; so the message is a bit confusing, as it really means "I am now
ignoring route X"

Correcting the message would avoid confusing users.

Mailing list thread:

Change History (12)

comment:1 Changed 8 years ago by krzee king

Component: Generic / unclassifiedConfiguration
Priority: majortrivial

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

The issue is not due to the local "route", but due to "route-nopull" taking away the permission to install pushed "route", effectively telling the option parser "no, this option is not valid here".

The option parser (option.c) is a mass of pure magic, with a bit of madness woven into it, so I'm not sure how much effort it would be to do this in a nice way, without adding lots of extra code.

Maybe just add to FAQ?

comment:3 Changed 7 years ago by Gert Döring

Milestone: release 2.3.5

Won't go into 2.3.4, but maybe the error message can be improved for 2.3.5 or git master.

comment:4 Changed 6 years ago by Samuli Seppänen

Converted this into a FAQ item. Closing this ticket.

comment:5 Changed 6 years ago by Gert Döring

Milestone: release 2.3.5release 2.3.7

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

Resolution: worksforme
Status: newclosed

Actually closing the ticket now :-) - it is in the FAQ, and changing the error message to print a different message depending on the context (route-nopull or "just not a valid command") is not straight-forward, and IMHO not worth the gain.

comment:7 Changed 2 years ago by trivia21

I still get this message after applying the suggested changes in the FAQ to the client configuration.

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

Resolution: worksforme
Status: closedreopened

Actually the FAQ item is just wrong in claiming "this will make the error message go away".

If you use --route-nopull on the client, and the server is pushing a route to you, you will get this error message, because this is what --route-nopull does.

Order in client configs has no relevance (unless you have <connection> blocks).

@samuli: can you correct the FAQ item, please, and mention that this can be solved nowadays by configuring

pull-filter ignore "route "

instead of using --route-nopull? pull-filter is a 2.4 addition, though.

If anyone still uses 2.3.x, they should better upgrade :-)

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

Owner: set to Samuli Seppänen
Status: reopenedassigned

comment:10 Changed 2 years ago by Samuli Seppänen

@cron: so what part of the old FAQ item should we keep? Just replace the solution with "use pull-filter"?

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

Yes, just changing the "solution" part should be good. The explanation above is still correct.


comment:12 Changed 2 years ago by Samuli Seppänen

Resolution: fixed
Status: assignedclosed

FAQ item updated. Closing this as fixed.

Note: See TracTickets for help on using tickets.