HI,
On Wed, Jun 29, 2022 at 07:05:55PM +0200, Max Fillinger wrote:
> When running with --ifconfig-noexec, OpenVPN does not execute ifconfig,
> but on exit, it still tries to "undo" the configuration it would have
> done. This patch fixes it by extracting an undo_ifconfig() function from
> close_tun(). The undo function is called before close_tun(), but only if
> --ifconfig-noexec isn't set. This is symmetric to how open_tun() and
> do_ifconfig() are used.
>
> v2: Fix tabs-vs-spaces.
> v3: Fix another style mistake.
> v4: Move undo_ifconfig{4,6}() out of #ifdef TARGET_LINUX.
> v5: Keep ctx argument in close_tun().
I did what I promised too many weeks ago, and pushed this change
towards the buildbot army... alas, they did what I was afraid they
would do: complained.
+-DPLUGIN_LIBDIR=\"/usr/local/lib/openvpn/plugins\" -Wall -g -O2 -std=c99 -MT
+tun.o -MD -MP -MF .deps/tun.Tpo -c -o tun.o tun.c
tun.c:1656:73: error: passing 'struct gc_arena' to parameter of incompatible
+type 'struct gc_arena *'; take the address with &
const char *ifconfig_ipv6_local = print_in6_addr(tt->local_ipv6, 0, gc);
^~
&
./socket.h:391:88: note: passing argument to parameter 'gc' here
const char *print_in6_addr(struct in6_addr addr6, unsigned int flags, struct
+gc_arena *gc);
so the "non-linux" bits of undo_ifconfig_ipv6() have been broken since
ever - but the patch now actually shows that to the compiler...
> +#elif !defined(_WIN32) /* if !defined(TARGET_LINUX) && !defined(_WIN32) */
> + struct gc_arena gc = gc_new();
> + const char *ifconfig_ipv6_local = print_in6_addr(tt->local_ipv6, 0, gc);
> + struct argv argv = argv_new();
... and inded, this needs to be "&gc"...
Can you please send a v6 that changes this, and also rebases against
master? The context has changed a bit, and one hunk (#endif /* comment */)
is no longer relevant, as that #endif never came into existance :-)
We should then be able to proceed more quickly...
thanks,
gert
--
"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]
signature.asc
Description: PGP signature
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
