Opened 15 years ago

Closed 10 years ago

#22689 closed defect (fixed)

openvpn2-2.0.9 Compiling for x86_64 leads to wrong behaviour

Reported by: wickedguitar6@… Owned by: jul_bsd@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: LP64 Cc: erik@…, cruoho@…, ewen-naos-nz (Ewen McNeill)
Port: openvpn2

Description

There is a bug which leads to wrong detection of the default_gateway (0.0.0.0) when the three following conditions apply: 1) openvpn2-2.0.9 is compiled with gcc-4.2 (the default on Mac OS X 10.6) 2) It is used as a client 3) 'push "redirect-gateway def1"' is used on the server side (e.g. a linux-box)

When the openvpn-2.0.9 is compiled with gcc-4.0 the bug does not occur. Default_gateway is detected correctly. However the gcc-4.0 compiler is not aware of the lzo2 library and openvpn must be configured with "--disable-lzo".

Change History (12)

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Cc: wickedguitar6@… pmq@… removed
Keywords: openvpn2 default_gateway gcc-4.0 removed
Owner: changed from macports-tickets@… to pmq@…

comment:2 in reply to:  description Changed 15 years ago by wickedguitar6@…

The problem seems to be irrelevant to the version of the gcc compiler used. However, it is relevant to whether the executable is compiled for "i386" or "x86_64" architecture. By default gcc-4.2 produces x86_64 executables and the gcc-4.0 i386 ones. When compiled as x86_64 executable it is unable to find the default_gateway on the system.

comment:3 Changed 15 years ago by erik@…

Cc: erik@… added

Cc Me!

comment:4 Changed 15 years ago by jmroot (Joshua Root)

Keywords: LP64 added
Summary: openvpn2-2.0.9 Compiling with gcc-4.2 leads to wrong behaviouropenvpn2-2.0.9 Compiling for x86_64 leads to wrong behaviour

comment:5 Changed 14 years ago by jmroot (Joshua Root)

Cc: jordiyeh@… removed

Is this still a problem with 2.1.1?

comment:6 Changed 13 years ago by cruoho@…

Cc: cruoho@… added

Cc Me!

comment:7 Changed 13 years ago by cruoho@…

This problem still exists as of 2.2.0.

comment:8 Changed 13 years ago by pmq@…

Owner: changed from pmq@… to macports-tickets@…

Stepping down for maintainership as I'm not using this anymore.

comment:9 Changed 13 years ago by ewen-naos-nz (Ewen McNeill)

From what I can tell this is the OpenVPN bug for the same issue:

https://community.openvpn.net/openvpn/ticket/42

It seems to still exist as a bug in 2.2.1, despite being known about as a bug for a couple of years. A somewhat related proposed OpenVPN patch from years back:

http://openvpn.net/archive/openvpn-devel/2006-07/msg00003.html

suggests the relevant bit of code that will need work, viz route.c get_default_gateway(). At a guess there's some sort of word size related issue, since apparently 32-bit x86 works and 64-bit x86-64 doesn't.

Ewen

comment:10 Changed 13 years ago by ewen-naos-nz (Ewen McNeill)

Cc: macports@… added

Cc Me!

comment:11 Changed 10 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to jul_bsd@…

comment:12 Changed 10 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Upstream ticket says this should be fixed as of 2.3 at least (if not earlier). Please reopen if this is not the case.

Note: See TracTickets for help on using tickets.