Opened 13 months ago

Last modified 13 months ago

#1156 new Bug / Defect

openvpn_plugin_func_v3 version documentation disagrees with code

Reported by: gojolu Owned by:
Priority: minor Milestone:
Component: plug-ins / plug-in API Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

The documentation for openvpn_plugin_func_v3() (as specified in include/openvpn-plugin.h.in) states that:

version: ... The plug-in should validate that this value is matching the OPENVPN_PLUGIN_VERSION value.

However, plugin_call_item() which calls openvpn_plugin_func_v3() (as specified in src/openvpn/plugin.c) actually passes OPENVPN_PLUGINv3_STRUCTVER instead of the expected OPENVPN_PLUGIN_VERSION on line 561 as show below.

status = (*p->func3)(OPENVPN_PLUGINv3_STRUCTVER, &args, &retargs);

This discrepancy causes all plug-ins that use openvpn_plugin_func_v3() and follow the recommendations of the documentation to fail for any OpenVPN versions where OPENVPN_PLUGIN_VERSION does not equal OPENVPN_PLUGINv3_STRUCTVER. A cursory examination reveals this to be all 2.3 versions and any 2.4 versions >= 2.4.2.

Change History (1)

comment:1 Changed 13 months ago by gojolu

Duplicate of ticket #1155. Sorry.

Note: See TracTickets for help on using tickets.