[S] Change in openvpn[master]: SIGHUP-restart instance on UDP write error EADDRNOTAVAIL
"ordex \(Code Review\) via Openvpn-devel" <[email protected]> Mon, 3 Aug 2026 13:27:33 +0000
| Newsgroups | gmane.network.openvpn.devel |
|---|---|
| Message-ID | <6f4a0b9c18d762752e1f6c72ed6bdf0c28e9f577-EmailReviewComments-HTML@gerrit.openvpn.net> |
--===============4482147940872725147==
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="hIidO5n9U2o="; charset=UTF-8
--hIidO5n9U2o=
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, plaisthos=2E
ordex has posted=
comments on this change by cron2=2E ( http://gerrit=2Eopenvpn=2Enet/c/open=
vpn/+/1830?usp=3Demail )
Change subject: SIGHUP-restart instance on UDP wr=
ite error EADDRNOTAVAIL
=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=
=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=
=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=
=2E=2E=2E
Patch Set 2:
(4 comments)
File src/openvpn/forward=2Ec:
http=
://gerrit=2Eopenvpn=2Enet/c/openvpn/+/1830/comment/572a9546_aa6773b9?usp=3D=
email :
PS2, Line 1865: if (size < 0 && errno =3D=3D EADDRNOTAVAIL)=
> good catch=2E Will adjust=2E [=E2=80=A6]
well, unless EADDRNOTAVAIL on =
Windows is equal to some WSRANDOMTHING that may be returned under other cir=
cumstances, no (hopefully not)?
http://gerrit=2Eopenvpn=2Enet/c/openvpn/+=
/1830/comment/c7127dda_9938ba98?usp=3Demail :
PS2, Line 1868: r=
egister_signal(c->sig, SIGHUP, "link-changed");
> I can't follow you=2E [=
=E2=80=A6]
you're right=2E I was testing with `--config stdin` and the othe=
r option was already there in my harness, but it's indeed irrelevant=2E
At=
the same time I searched this pattern across the code and I saw other spot=
s where we register SIGHUP without checking if config is coming from stdin=
=2E So this patch has indeed this issue, but it's not new :-D !!!
You can =
decide if you want to add a guard here or if this should be fixed later on =
along the other spots=2E
Moreover, the other spots where we register SIGHU=
P have a `c->persist=2Erestart_sleep_seconds =3D 10;` right after, so that =
we do not busy loop in case of permanent error=2E Worth adding here too?
=
http://gerrit=2Eopenvpn=2Enet/c/openvpn/+/1830/comment/8a5b06fd_81757e6d?us=
p=3Demail :
PS2, Line 1868: register_signal(c->sig, SIGHUP, "li=
nk-changed");
> In this case, we would do a `SIGHUP` reconnect anyway, just=
"after `--ping-restart` expires"=2E [=E2=80=A6]
When we hit `connect_retry=
_max` attempts, we have an M_FATAL that stops everything=2E
With this patch=
we'll keep looping=2E
Note, as I said in the other comment, there are oth=
er areas of the code where we register SIGHUP and also in those cases we do=
n't honor `connect-max-reply`=2E=2E=2E
http://gerrit=2Eopenvpn=2Enet/c/op=
envpn/+/1830/comment/1f257674_6a405be6?usp=3Demail :
PS2, Line 1868: =
register_signal(c->sig, SIGHUP, "link-changed");
> I'm not sure this =
can be triggered in a meaningful way on a server - there are no redirect ro=
utes fo [=E2=80=A6]
Agreed this might be difficult, but there might be othe=
r scenarios (which we are not seeing now) that may trigger this error=2E Th=
anks!
--
To view, visit http://gerrit=2Eopenvpn=2Enet/c/openvpn/+/1830?=
usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://=
gerrit=2Eopenvpn=2Enet/settings?usp=3Demail
Gerrit-MessageType: comment
Ge=
rrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I96b5ea3542df=
77b1be17079874fb9e4970b539ed
Gerrit-Change-Number: 1830
Gerrit-PatchSet: 2
=
Gerrit-Owner: cron2 <gert@greenie=2Emuc=2Ede>
Gerrit-Reviewer: ordex <anton=
io@mandelbit=2Ecom>
Gerrit-Reviewer: plaisthos <arne-openvpn@rfc2549=2Eorg>=
Gerrit-CC: openvpn-devel <openvpn-devel@lists=2Esourceforge=2Enet>
Gerrit-=
Attention: plaisthos <arne-openvpn@rfc2549=2Eorg>
Gerrit-Attention: cron2 <=
gert@greenie=2Emuc=2Ede>
Gerrit-Comment-Date: Mon, 03 Aug 2026 13:27:33 +00=
00
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cron2=
<gert@greenie=2Emuc=2Ede>
Comment-In-Reply-To: ordex <antonio@mandelbit=2E=
com>
--hIidO5n9U2o=
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html><html><head><style></style></head><body><p> Attention is cur=
rently required from: cron2, plaisthos=2E </p>
<p><a href=3D"http://gerrit=
=2Eopenvpn=2Enet/c/openvpn/+/1830?usp=3Demail">View Change</a></p><p>4 comm=
ents:</p><ul style=3D"list-style: none; padding: 0;"><li style=3D"margin: 0=
; padding: 0;"><p>File src/openvpn/forward=2Ec:</p><ul style=3D"list-style:=
none; padding: 0;"><li style=3D"margin: 0; padding: 0 0 0 16px;"><p style=
=3D"margin-bottom: 4px;"><a href=3D"http://gerrit=2Eopenvpn=2Enet/c/openvpn=
/+/1830/comment/572a9546_aa6773b9?usp=3Demail">Patch Set #2, Line 1865:</a>=
<code style=3D"font-family:monospace,monospace"> if (size < 0 &a=
mp;& errno =3D=3D EADDRNOTAVAIL)</code></p><p><blockquote style=3D"bord=
er-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">good catch=2E W=
ill adjust=2E [=E2=80=A6]</blockquote></p><p class=3D"blocks" style=3D"whit=
e-space: pre-wrap; word-wrap: break-word;">well, unless EADDRNOTAVAIL on Wi=
ndows is equal to some WSRANDOMTHING that may be returned under other circu=
mstances, no (hopefully not)?</p></li><li style=3D"margin: 0; padding: 0 0 =
0 16px;"><p style=3D"margin-bottom: 4px;"><a href=3D"http://gerrit=2Eopenvp=
n=2Enet/c/openvpn/+/1830/comment/c7127dda_9938ba98?usp=3Demail">Patch Set #=
2, Line 1868:</a> <code style=3D"font-family:monospace,monospace"> =
register_signal(c->sig, SIGHUP, "link-changed");</code></p>=
<p><blockquote style=3D"border-left: 1px solid #aaa; margin: 10px 0; paddin=
g: 0 10px;">I can't follow you=2E [=E2=80=A6]</blockquote></p><p class=
=3D"blocks" style=3D"white-space: pre-wrap; word-wrap: break-word;">you'=
;re right=2E I was testing with `--config stdin` and the other option was a=
lready there in my harness, but it's indeed irrelevant=2E</p><p class=
=3D"blocks" style=3D"white-space: pre-wrap; word-wrap: break-word;">At the =
same time I searched this pattern across the code and I saw other spots whe=
re we register SIGHUP without checking if config is coming from stdin=2E So=
this patch has indeed this issue, but it's not new :-D !!!</p><p class=
=3D"blocks" style=3D"white-space: pre-wrap; word-wrap: break-word;">You can=
decide if you want to add a guard here or if this should be fixed later on=
along the other spots=2E</p><p class=3D"blocks" style=3D"white-space: pre-=
wrap; word-wrap: break-word;">Moreover, the other spots where we register S=
IGHUP have a `c->persist=2Erestart_sleep_seconds =3D 10;` right after, s=
o that we do not busy loop in case of permanent error=2E Worth adding here =
too?</p></li><li style=3D"margin: 0; padding: 0 0 0 16px;"><p style=3D"marg=
in-bottom: 4px;"><a href=3D"http://gerrit=2Eopenvpn=2Enet/c/openvpn/+/1830/=
comment/8a5b06fd_81757e6d?usp=3Demail">Patch Set #2, Line 1868:</a> <code s=
tyle=3D"font-family:monospace,monospace"> register_signal(c->=
sig, SIGHUP, "link-changed");</code></p><p><blockquote style=3D"b=
order-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">In this case,=
we would do a `SIGHUP` reconnect anyway, just "after `--ping-restart`=
expires"=2E [=E2=80=A6]</blockquote></p><p class=3D"blocks" style=3D"=
white-space: pre-wrap; word-wrap: break-word;">When we hit `connect_retry_m=
ax` attempts, we have an M_FATAL that stops everything=2E<br>With this patc=
h we'll keep looping=2E</p><p class=3D"blocks" style=3D"white-space: pr=
e-wrap; word-wrap: break-word;">Note, as I said in the other comment, there=
are other areas of the code where we register SIGHUP and also in those cas=
es we don't honor `connect-max-reply`=2E=2E=2E</p></li><li style=3D"mar=
gin: 0; padding: 0 0 0 16px;"><p style=3D"margin-bottom: 4px;"><a href=3D"h=
ttp://gerrit=2Eopenvpn=2Enet/c/openvpn/+/1830/comment/1f257674_6a405be6?usp=
=3Demail">Patch Set #2, Line 1868:</a> <code style=3D"font-family:monospace=
,monospace"> register_signal(c->sig, SIGHUP, "link-chang=
ed");</code></p><p><blockquote style=3D"border-left: 1px solid #aaa; m=
argin: 10px 0; padding: 0 10px;">I'm not sure this can be triggered in =
a meaningful way on a server - there are no redirect routes fo [=E2=80=A6]<=
/blockquote></p><p class=3D"blocks" style=3D"white-space: pre-wrap; word-wr=
ap: break-word;">Agreed this might be difficult, but there might be other s=
cenarios (which we are not seeing now) that may trigger this error=2E Thank=
s!</p></li></ul></li></ul><p>To view, visit <a href=3D"http://gerrit=2Eopen=
vpn=2Enet/c/openvpn/+/1830?usp=3Demail">change 1830</a>=2E To unsubscribe, =
or for help writing mail filters, visit <a href=3D"http://gerrit=2Eopenvpn=
=2Enet/settings?usp=3Demail">settings</a>=2E</p><div itemscope itemtype=3D"=
http://schema=2Eorg/EmailMessage"><div itemscope itemprop=3D"action" itemty=
pe=3D"http://schema=2Eorg/ViewAction"><link itemprop=3D"url" href=3D"http:/=
/gerrit=2Eopenvpn=2Enet/c/openvpn/+/1830?usp=3Demail"/><meta itemprop=3D"na=
me" content=3D"View Change"/></div></div>
<div style=3D"display:none"> Ger=
rit-MessageType: comment </div>
<div style=3D"display:none"> Gerrit-Project=
: openvpn </div>
<div style=3D"display:none"> Gerrit-Branch: master </div>
=
<div style=3D"display:none"> Gerrit-Change-Id: I96b5ea3542df77b1be17079874f=
b9e4970b539ed </div>
<div style=3D"display:none"> Gerrit-Change-Number: 183=
0 </div>
<div style=3D"display:none"> Gerrit-PatchSet: 2 </div>
<div style=
=3D"display:none"> Gerrit-Owner: cron2 <gert@greenie=2Emuc=2Ede> </di=
v>
<div style=3D"display:none"> Gerrit-Reviewer: ordex <antonio@mandelbi=
t=2Ecom> </div>
<div style=3D"display:none"> Gerrit-Reviewer: plaisthos =
<arne-openvpn@rfc2549=2Eorg> </div>
<div style=3D"display:none"> Gerr=
it-CC: openvpn-devel <openvpn-devel@lists=2Esourceforge=2Enet> </div>=
<div style=3D"display:none"> Gerrit-Attention: plaisthos <arne-openvpn@=
rfc2549=2Eorg> </div>
<div style=3D"display:none"> Gerrit-Attention: cro=
n2 <gert@greenie=2Emuc=2Ede> </div>
<div style=3D"display:none"> Gerr=
it-Comment-Date: Mon, 03 Aug 2026 13:27:33 +0000 </div>
<div style=3D"displ=
ay:none"> Gerrit-HasComments: Yes </div>
<div style=3D"display:none"> Gerri=
t-Has-Labels: No </div>
<div style=3D"display:none"> Comment-In-Reply-To: c=
ron2 <gert@greenie=2Emuc=2Ede> </div>
<div style=3D"display:none"> Co=
mment-In-Reply-To: ordex <antonio@mandelbit=2Ecom> </div>
</body></h=
tml>
--hIidO5n9U2o=--
--===============4482147940872725147==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4482147940872725147==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
--===============4482147940872725147==--