Is --ifconfig-ipv6-noexec planned ?
Hi,
--ifconfig-ipv6-noexec
not sure if this would be a 'feature request/wish list' item or if it has just been over looked.
I did have an annoying use case but I reconfigured so as not to need it, but I feel like there would be cases for it.
thanks
Hi,
Quoted 7 lines · On Mon, Aug 08, 2016 at 01:05:06PM +0100, debbie10t wrote:
--ifconfig-ipv6-noexec
not sure if this would be a 'feature request/wish list' item or if it has just been over looked.
I did have an annoying use case but I reconfigured so as not to need it, but I feel like there would be cases for it.
I do not see the use case to have "only IPv6" --ifconfig-noexec - so the generic command does that for both IPv4 and IPv6 (as will --route-noexec do for both IPv4 and IPv6).
What is your use case?
(The idea behind --ifconfig-noexec is not "do not enable IPv6", use --pull-filter for that. --ifconfig-noexec is used together with --up to run more custom stuff on ifconfig, which the built-in mechanisms cannot do)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 8 lines · Gert Doering
Hi,
Quoted 5 lines · On Mon, Aug 08, 2016 at 01:05:06PM +0100, debbie10t wrote:
--ifconfig-ipv6-noexec
not sure if this would be a 'feature request/wish list' item or if it has just been over looked.
Quoted 7 lines
Quoted 2 lines
I did have an annoying use case but I reconfigured so as not to need it, but I feel like there would be cases for it.
I do not see the use case to have "only IPv6" --ifconfig-noexec - so the generic command does that for both IPv4 and IPv6 (as will --route-noexec do for both IPv4 and IPv6).
What is your use case?
Use case is a service listening on client tun device would crash if the connection was not up. So I used --mktun to create the interface at boot for the service and then start the service. when starting openvpn, pulling the ipv4&6 addresses would exit openvpn as the ipv6 address already existed. ifconfig exit with error status 1, FATAL etc.
Quoted 6 lines
(The idea behind --ifconfig-noexec is not "do not enable IPv6", use --pull-filter for that. --ifconfig-noexec is used together with --up to run more custom stuff on ifconfig, which the built-in mechanisms cannot do)
Sorry gert, I must have done something stupid before because now --ifconfig-noexec *does* work for IPv4 & 6 .. For some reason as it was the IPv6 address causing the fault I thought it only worked for IPv4 .. unfortunately, I don't know what mistake I made :(
So I can setup the original way, although, now that I have reconfigured I prefer the new setup, so I don't actually need ifconfig-noexec.
Regards
Quoted 13 lines · On 08/08/16 15:27, debbie10t wrote:
Quoted 10 lines · Gert Doering
Hi,
Quoted 6 lines · On Mon, Aug 08, 2016 at 01:05:06PM +0100, debbie10t wrote:
--ifconfig-ipv6-noexec
not sure if this would be a 'feature request/wish list' item or if it has just been over looked.
Quoted 7 lines
Quoted 6 lines
(The idea behind --ifconfig-noexec is not "do not enable IPv6", use --pull-filter for that. --ifconfig-noexec is used together with --up to run more custom stuff on ifconfig, which the built-in mechanisms cannot do)
Sorry, I feel I need a better explanation for this problem ..
--ifconfig-noexec should *not* exec anything IPv4 *and* IPv6
I have spent some considerable hours on this now, I have working server & client configs & logs at verb 4 which essentially prove that --ifconfig-noexec does *not* effect IPv6.
The log clearly shows that openvpn is calling netsh.exe to configure IPv6 on the TAP adapter.
Side note, can be explored later:
With --ifconfig-noexec in the config, the log *does* show:ifconfig_noexec = DISABLED .. which seems wrong ?
I have also used --pull-filter ignore "ifconfig-ipv6 " and used batch files (windows client) to configure networking.
I can post full details here or as a bug or whatever you prefer.
While I accept the "work around" (--pull-filter, only available in git) Gert's answer is vague and the manual is misleading.
So I re-state my original question in a more appropriate way:
_Why_ does --ifconfig-noexec *not* effect IPv6 ?
The point here is that using --ifconfig-noexec & --up for IPv4 you manually configure everything
for IPv6 you *must* --pull-filter ignore "ifconfig-ipv6 " because --ifconfig-noexec has *no* effect on IPv6
Thankyou.
Hi,
Quoted 3 lines · On Wed, Aug 17, 2016 at 12:54:20PM +0100, debbie10t wrote:
So I re-state my original question in a more appropriate way:
_Why_ does --ifconfig-noexec *not* effect IPv6 ?
It *does*. The only place in OpenVPN where this flag is checked is in init.c:
Windows and Android:
/* do ifconfig */
if (!c->options.ifconfig_noexec
&& ifconfig_order () == IFCONFIG_BEFORE_TUN_OPEN)
{
/* guess actual tun/tap unit number that will be returned
by open_tun */
const char *guess = guess_tuntap_dev (c->options.dev,
c->options.dev_type,
c->options.dev_node,
&gc);
do_ifconfig (c->c1.tuntap, guess, TUN_MTU_SIZE (&c->c2.frame), c->c2.e
s);
}all other platforms:
/* do ifconfig */
if (!c->options.ifconfig_noexec
&& ifconfig_order () == IFCONFIG_AFTER_TUN_OPEN)
{
do_ifconfig (c->c1.tuntap, c->c1.tuntap->actual_name, TUN_MTU_SIZE (&c
->c2.frame), c->c2.es);
}... but as you can see, there is no "do_ifconfig_ipv4()" inside the clause, and "do_ifconfig_ipv6()" outside. do_ifconfig() does IPv4 and IPv6 (tun.c) - if if it is not called for IPv4, there is nothing else in the code that would do ifconfig for IPv6.
Quoted 4 lines
The point here is that using --ifconfig-noexec & --up for IPv4 you manually configure everything
for IPv6 you *must* --pull-filter ignore "ifconfig-ipv6 " because --ifconfig-noexec has *no* effect on IPv6
Please show a log file that shows
- incoming push message
- that IPv4 is not ifconfig'ed
- but IPv6 is
(I'm not saying our code has no bugs, but I cannot see a way how this could ever happen)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...A message that is not in the archive (sent off-list or not yet received): [email protected]...
Hi,
(copying openvpn-devel back in, as Selva has a surprising explanation for this)
Quoted 7 lines · Selva Nair
If the problem is on windows I believe this may be related to
ifconfig_noexecbeing
reset on windows toip_win32_type= manual, or some such. Thendo_ifconfigwill get called and the ip setting should get skipped inside it. Recall
seeing it while looking into the code setting ipv6 by service. Don't have access to the repo to be more precise..
You are right:
if (options->ifconfig_noexec)
{
options->tuntap_options.ip_win32_type = IPW32_SET_MANUAL;
options->ifconfig_noexec = false;
}(in options.c)
so indeed, it would call do_ifconfig() then, and explicitely not do IPv4, and then just go forward as if nothing had happened and *do* IPv6.
What a horrible hack... I hope we can get rid of this as soon as Heiko's "do windows in the normal order of things" patch has been fully tested and merged.
I'll open a trac ticket as soon as I have proper Internet again, which is not paid by the kbyte...
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi
Quoted 26 lines · Gert Doering
Hi,
(copying openvpn-devel back in, as Selva has a surprising explanation for this)
Quoted 7 lines · Selva Nair
If the problem is on windows I believe this may be related to
ifconfig_noexecbeing
reset on windows toip_win32_type= manual, or some such. Thendo_ifconfigwill get called and the ip setting should get skipped inside it. Recall
seeing it while looking into the code setting ipv6 by service. Don't have access to the repo to be more precise..You are right:
if (options->ifconfig_noexec) { options->tuntap_options.ip_win32_type = IPW32_SET_MANUAL; options->ifconfig_noexec = false; }(in
options.c)so indeed, it would call
do_ifconfig()then, and explicitely not do IPv4, and then just go forward as if nothing had happened and *do* IPv6.
Quoted 8 lines
What a horrible hack... I hope we can get rid of this as soon as Heiko's "do windows in the normal order of things" patch has been fully tested and merged.
I'll open a trac ticket as soon as I have proper Internet again, which is not paid by the kbyte...
gert
Many thanks Gert and Selva for taking the time to look into this.
I am happy to open a trac ticket for you and attach all my details tomorrow. save you some time for important stuff :-)
Regards