From: "d12fk (Code Review)"
Date: Thu, 27 Feb 2025 00:29:40 +0000
In-Reply-To:
References:
Reply-To: heiko@...515..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID: <8cf737aee3db4edbab77eaafdbfa86379037580d-EmailReviewComments-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="y3+wjer7gj8="; charset=UTF-8
Subject: [Openvpn-devel] [L] Change in openvpn[master]: dns: apply settings
via script on unixoid systems
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Cc: flichtenheld , plaisthos , openvpn-devel
--y3+wjer7gj8=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld, plaisthos.
d12fk has posted comments on this change. ( http://gerrit.openvpn.net/c/ope=
nvpn/+/838?usp=3Demail )
Change subject: dns: apply settings via script on unixoid systems
......................................................................
Patch Set 8:
(5 comments)
File distro/dns-scripts/systemd-dns-updown.sh:
http://gerrit.openvpn.net/c/openvpn/+/838/comment/e7242d2e_9ce75db6 :
PS7, Line 91: [[ "$(readlink /etc/resolv.conf)" =3D~ systemd ]] || retu=
rn 1
> This fallback is nice, but I really would like to see some kind of messag=
e about it in the log.
Problem is that scripts can't log anything afaik.
File src/openvpn/dns.c:
http://gerrit.openvpn.net/c/openvpn/+/838/comment/431ae915_d56a1d76 :
PS7, Line 545: int res =3D openvpn_run_script(&argv, es, S_FATAL|S_EXIT=
CODE, "dns script");
> This actually lead to annoying problems in my testing. [=E2=80=A6]
Acknowledged
File src/openvpn/options.c:
http://gerrit.openvpn.net/c/openvpn/+/838/comment/65694cc7_b840e8a4 :
PS7, Line 911: o->dns_options.script =3D DNS_UPDOWN_PATH;
> This does not work well as an unconditional default I think. [=E2=80=A6]
Built-in script now runs as built-in and should not be complained about any=
longer.
http://gerrit.openvpn.net/c/openvpn/+/838/comment/55e960a6_805f6e3f :
PS7, Line 8045: else if (streq(p[0], "dns-script") && p[1])
> New script should be documented in `doc/man-sections/script-options. [=E2=
=80=A6]
Actually missed pushing the doc commit the whole time, thanks for pointing =
it out.
http://gerrit.openvpn.net/c/openvpn/+/838/comment/c7497690_9e53e4ce :
PS7, Line 8052: set_user_script(options, &options->dns_options.scri=
pt, p[1], p[0], false);
> Again, this does not behave nice at all. [=E2=80=A6]
Not sure if we need the possibility to disable --dns-script, as on Windows =
it is not possible either, but it is implemented now by --dns-script disabl=
e, with disable being a reserved "filename" for that purpose. Seemed reason=
able.
Also the built-in script requires script-security 1 now, 2 is only needed f=
or user defined scripts, works as intended this way.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/838?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ifbe4ffb44d3bfcaa50adb38cacb3436fcdc71b10
Gerrit-Change-Number: 838
Gerrit-PatchSet: 8
Gerrit-Owner: d12fk
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: flichtenheld
Gerrit-Comment-Date: Thu, 27 Feb 2025 00:29:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld
Gerrit-MessageType: comment
--y3+wjer7gj8=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld, plaisthos.
View C=
hange
5 comments:
Problem is that scripts can't log =
anything afaik.
F=
ile src/openvpn/dns.c:
<=
a href=3D"http://gerrit.openvpn.net/c/openvpn/+/838/comment/431ae915_d56a1d=
76">Patch Set #7, Line 545: int res =3D openvpn_run_script(&argv, es, S_FATAL|S_EXITCODE, =
"dns script");
This actually lead to annoyi=
ng problems in my testing. [=E2=80=A6]
Acknowledged
File src/openvpn/options.c:
Patch Set #7, Line 911: o->dns_options.script =
=3D DNS_UPDOWN_PATH;
This does not work well as an un=
conditional default I think. [=E2=80=A6]
Built-in script now runs as built-=
in and should not be complained about any longer.
Patch Se=
t #7, Line 8045: el=
se if (streq(p[0], "dns-script") && p[1])
New script should be documented in `doc/man-sections/script-options.=
[=E2=80=A6]
Actually missed pushing the doc commit the whole time, thanks =
for pointing it out.
- =
Patch Set #7, Line 8052: set_user_script(options, &a=
mp;options->dns_options.script, p[1], p[0], false);
Again, this does not behave nice at all. [=E2=80=A6]
Not sure if we need =
the possibility to disable --dns-script, as on Windows it is not possible e=
ither, but it is implemented now by --dns-script disable, with disable bein=
g a reserved "filename" for that purpose. Seemed reasonable.
<=
p style=3D"white-space: pre-wrap; word-wrap: break-word;">Also the built-in=
script requires script-security 1 now, 2 is only needed for user defined s=
cripts, works as intended this way.
To view, visi=
t change =
838. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ifbe4ffb44d3bfcaa50adb38cacb=
3436fcdc71b10
Gerrit-Change-Number: 838
Gerrit-PatchSet: 8
Gerrit-Owner: d12fk <heiko@...515...> =
div>
Gerrit-Reviewer: flichtenheld <frank@...2716...=
1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...=
41...>
Gerrit-Comment-Date: Thu, 27 Feb 2025 00:29:40=
+0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <frank@...1186...=
.2641...>
Gerrit-MessageType: comment
--y3+wjer7gj8=--