Skip to contentSkip to conversation

foreign_option_2 not set in 2.4

Openvpn-devel Cyril Scetbon 4 participants 7 messages Nov 22, 2018

lore
Share & tools
lore
#0 lore raw

Hey guys,

I’ve discovered that foreign_option_2 is not set using 2.4.4 but is set using 2.3.10.

foreign_option_1=dhcp-option DNS 10.201.50.150
foreign_option_2=dhcp-option DOMAIN cyril.net

I had to downgrade to 2.3 because of it.

Thanks
—
Cyril Scetbon

#1 lore raw

Hi,

Quoted 6 lines · Cyril Scetbon

I???ve discovered that foreign_option_2 is not set using 2.4.4 but is set using 2.3.10.

foreign_option_1=dhcp-option DNS 10.201.50.150
foreign_option_2=dhcp-option DOMAIN cyril.net

I had to downgrade to 2.3 because of it.

Which platform? What's shown in the (--verb 4) log file?

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#2 lore raw

OpenVPN 2.4.6 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Jul 8 2018

Output with —verb 4 https://pastebin.com/huQmnGaU <https://pastebin.com/huQmnGaU>
—
Cyril Scetbon

Quoted 23 lines · Gert Doering

Hi,

Quoted 6 lines · Cyril Scetbon

I???ve discovered that foreign_option_2 is not set using 2.4.4 but is set using 2.3.10.

foreign_option_1=dhcp-option DNS 10.201.50.150
foreign_option_2=dhcp-option DOMAIN cyril.net

I had to downgrade to 2.3 because of it.

Which platform? What's shown in the (--verb 4) log file?

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
feed honest figures into a computer, honest figures come out. Never doubted 
it myself till I met a computer with a sense of humor."
                            Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#3 lore raw

Am 22.11.18 um 14:46 schrieb Cyril Scetbon:

Quoted 5 lines

OpenVPN 2.4.6 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Jul  8 2018

Output with —verb 4 https://pastebin.com/huQmnGaU

Read your log closer. This is not a bug in OpenVPN but rather a broken config what we accepted in 2.3:

Thu Nov 22 13:34:56 2018 us=235164 PUSH: Received control message:
'PUSH_REPLY,route 10.0.0.0 255.0.0.0,route 192.168.174.0 255.255.255.0,route 193.252.149.32 255.255.255.224,route 193.252.121.96 255.255.255.224,dhcp-option DNS 10.201.67.120,dhcp-option DOMAIN cyril.net cyril2.net,route 10.252.12.150,topology net30,ping 5,ping-restart 30,ifconfig 10.252.12.158 10.252.12.157'

Thu Nov 22 13:34:56 2018 us=235314 Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:6: dhcp-option (2.4.6)

OpenVPN gets 'dhcp-option DOMAIN cyril.net cyril2.net' via push and using two arguments after DOMAIN is wrong but OpenVPN 2.3 ignored the second argument while 2.4 gives you an error and ignores the whole option.

Arne

#4 lore raw

Hi,

Quoted 16 lines · Arne Schwabe

Am 22.11.18 um 14:46 schrieb Cyril Scetbon:

Quoted 5 lines

OpenVPN 2.4.6 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Jul  8 2018

Output with —verb 4 https://pastebin.com/huQmnGaU

Read your log closer. This is not a bug in OpenVPN but rather a broken config what we accepted in 2.3:

Thu Nov 22 13:34:56 2018 us=235164 PUSH: Received control message:
'PUSH_REPLY,route 10.0.0.0 255.0.0.0,route 192.168.174.0 255.255.255.0,route 193.252.149.32 255.255.255.224,route 193.252.121.96 255.255.255.224,dhcp-option DNS 10.201.67.120,dhcp-option DOMAIN cyril.net cyril2.net,route 10.252.12.150,topology net30,ping 5,ping-restart 30,ifconfig 10.252.12.158 10.252.12.157'

Quoted 6 lines

Thu Nov 22 13:34:56 2018 us=235314 Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:6: dhcp-option (2.4.6)

OpenVPN gets 'dhcp-option DOMAIN cyril.net cyril2.net' via push and using two arguments after DOMAIN is wrong but OpenVPN 2.3 ignored the second argument while 2.4 gives you an error and ignores the whole option.

so what Arne is trying to say is:

with 2.4, do not use
  push "dhcp-option DOMAIN cyril.net cyril2net"
but use
  push 'dhcp-option "DOMAIN cyril.net cyril2net"'
instead.
Having said, that, pushing two DOMAINS does not make sense, AFAIK: Windows will only pick up one of them...

HTH,

JJK

#5 lore raw
In reply to Arne Schwabe

Weird cause I was sure I had this error in 2.3 too. But I tried again and I don’t get it. So I guess you’re right … I can’t really do anything as the server's config is out of my control …
Any idea on how to fix it other than by changing the server’s configuration ?

Quoted 28 lines · Arne Schwabe

Am 22.11.18 um 14:46 schrieb Cyril Scetbon:

Quoted 5 lines

OpenVPN 2.4.6 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Jul 8 2018

Output with —verb 4 https://pastebin.com/huQmnGaU

Read your log closer. This is not a bug in OpenVPN but rather a broken config what we accepted in 2.3:

Thu Nov 22 13:34:56 2018 us=235164 PUSH: Received control message:
'PUSH_REPLY,route 10.0.0.0 255.0.0.0,route 192.168.174.0 255.255.255.0,route 193.252.149.32 255.255.255.224,route 193.252.121.96 255.255.255.224,dhcp-option DNS 10.201.67.120,dhcp-option DOMAIN cyril.net cyril2.net,route 10.252.12.150,topology net30,ping 5,ping-restart 30,ifconfig 10.252.12.158 10.252.12.157'

Thu Nov 22 13:34:56 2018 us=235314 Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:6: dhcp-option (2.4.6)

OpenVPN gets 'dhcp-option DOMAIN cyril.net cyril2.net' via push and using two arguments after DOMAIN is wrong but OpenVPN 2.3 ignored the second argument while 2.4 gives you an error and ignores the whole option.

Arne

#6 lore raw

Am 22.11.18 um 16:17 schrieb Cyril Scetbon:

Quoted 3 lines

Weird cause I was sure I had this error in 2.3 too. But I tried again and I don’t get it. So I guess you’re right … I can’t really do anything as the server's config is out of my control …
Any idea on how to fix it other than by changing the server’s configuration ?

You could just add the option without the second domain into your local config as a very hacky workaround.

Arne