On 17/09/2020 18:19, Gert Doering wrote: > This is a new "samples" plugin which does not do many useful things, > besides > - show how a plugin is programmed > - how the various messages get dispatched > - how to pass back information from a client-connect/v2 plugin > - how to do async-cc plugins [not yet implemented] > > the operation of the plugin is controlled by UV_WANT_* environment variables > controlled by the client ("--setenv UV_WANT_CC_FAIL 1 --push-peer-info"), > to "fail CLIENT_CONNECT" or "use async-cc for CLIENT_CONNECT_V2" or > "send 'disable' back from ...") - which is useful for automated testing > of server success/defer/fail code paths for the CLIENT_CONNECT_* functions. > > See samples/sample-plugins/client-connect/README for details how to do this. > > v2: > - implement async / deferred operation both for CLIENT_CONNECT and > CLIENT_CONNECT_V2 plugin calls > - implement returning openvpn-controlled (setenv) config snippets > (so the client side can verify in automated testing that the plugin > operated correctly, without hard-coding something in the plugin code) > > v3: > - remove -Wno-unused-variable from Makefile > - remove unused "char ** argv" (commented out, but kept as reference) > > v4: > - upgrade to use the build infra brought by commit 0b5141d8f946 > - remove local Makefile > - include "config.h" to get what is needed to get rid of the strdup() > warning > --- > sample/sample-plugins/Makefile.plugins | 3 +- > sample/sample-plugins/README | 6 + > sample/sample-plugins/client-connect/README | 38 ++ > .../client-connect/sample-client-connect.c | 612 ++++++++++++++++++ > 4 files changed, 658 insertions(+), 1 deletion(-) > create mode 100644 sample/sample-plugins/client-connect/README > create mode 100644 > sample/sample-plugins/client-connect/sample-client-connect.c >
I've only glared at important code pieces, diffed against the v2 of this patch and compiled it on RHEL-7 (gcc-4.8.5 and gcc-9.3.1/devtoolset-9). Since everything is as expected now (no compiler complaints, diff is good) and prior review testing worked as expected ... Acked-By: David Sommerseth <dav...@openvpn.net> -- kind regards, David Sommerseth OpenVPN Inc
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel