Change in openvpn[master]: improve float collision logging
A message that is not in the archive (sent off-list or not yet received): gerrit.1752849659000.I217cfb319b85fd75a88f7d4d50c374d28771df28@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email
to review the following change.
Change subject: improve float collision logging
......................................................................
improve float collision logging
Extend the log message printed when an instance floats to an address already taken by another instance with the same certificate. The updated message now includes the instance being closed, the reason it's being closed, and the new instance taking over that address.
---
M src/openvpn/multi.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/91/1091/1
src/openvpn/multi.c +5 -1
@@ -3263,7 +3263,11 @@ mroute_addr_print(&mi->real, &gc)); goto done; } -msg (D_MULTI_MEDIUM ,"closing instance %s" ,multi_instance_string (ex_mi, false, &gc)); + +msg (D_MULTI_LOW ,"closing instance %s due to float collision with %s " +"using the same certificate" , +multi_instance_string (ex_mi, false, &gc), +multi_instance_string (mi, false, &gc));multi_close_instance (m, ex_mi, false); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I217cfb319b85fd75a88f7d4d50c374d28771df28
Gerrit-Change-Number: 1091
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos, ralf_lici.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email )
Change subject: improve float collision logging
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
works!
Disabled the "goto done" part from the "same peer-id" check, and played with the LAN cable :-) - resulting in
``` 2025-07-18 21:14:25 us=793140 cron2-freebsd-tc-amd64/udp6:193.149.48.173:49409 peer-id=0 disallowing peer 0 (cron2-freebsd-tc-amd64) from floating to its own address (udp6:193.149.48.173:49409) 2025-07-18 21:14:25 us=793175 cron2-freebsd-tc-amd64/udp6:193.149.48.173:49409 peer-id=0 closing instance cron2-freebsd-tc-amd64/udp6:193.149.48.173:49409 peer-id=0 due to float collision with cron2-freebsd-tc-amd64/udp6:193.149.48.173:49409 peer-id=0 using the same certificate ```
(and then, of course, it SIGSEGVs, but that's expected - so the extra logging makes this a much clearer picture. Could not reproduce with two different clients, but I don't think this will add extra testing coverage)
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I217cfb319b85fd75a88f7d4d50c374d28771df28
Gerrit-Change-Number: 1091
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: ralf_lici <[email protected]...>
Gerrit-Comment-Date: Fri, 18 Jul 2025 19:16:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH 1/1 improve float collision logging
In reply to a message not in the archiveFrom: Ralf Lici <[email protected]...>
Extend the log message printed when an instance floats to an address already taken by another instance with the same certificate. The updated message now includes the instance being closed, the reason it's being closed, and the new instance taking over that address.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1091
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/multi.c +5 -1
@@ -3263,7 +3263,11 @@ mroute_addr_print(&mi->real, &gc)); goto done; } -msg (D_MULTI_MEDIUM ,"closing instance %s" ,multi_instance_string (ex_mi, false, &gc)); + +msg (D_MULTI_LOW ,"closing instance %s due to float collision with %s " +"using the same certificate" , +multi_instance_string (ex_mi, false, &gc), +multi_instance_string (mi, false, &gc));multi_close_instance (m, ex_mi, false); }
[Openvpn-devel] [PATCH applied] Re: improve float collision logging
Just a small commit but would have saved us a few hours staring at logs today - due to a different bug, the floating code would try to "float to itself", find "that ip+port is already in use", kill 'that' instance (itself), and then crash on "where did my instance go?"... and we just got an ominous "closing instance" with no reason.
Verified that triggering the (already fixed) bug with the new message would produce a nicer and more helpful message. Good :-)
Your patch has been applied to the master branch.
commit 495e02e675a1c64ac902428ac82f6b1bfd35ed25
Author: Ralf Lici Date: Fri Jul 18 21:16:56 2025 +0200
improve float collision logging
Signed-off-by: Ralf Lici <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32226.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: improve float collision logging
......................................................................
improve float collision logging
Extend the log message printed when an instance floats to an address already taken by another instance with the same certificate. The updated message now includes the instance being closed, the reason it's being closed, and the new instance taking over that address.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32226.html
---
M src/openvpn/multi.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/91/1091/2
src/openvpn/multi.c +5 -1
@@ -3263,7 +3263,11 @@ mroute_addr_print(&mi->real, &gc)); goto done; } -msg (D_MULTI_MEDIUM ,"closing instance %s" ,multi_instance_string (ex_mi, false, &gc)); + +msg (D_MULTI_LOW ,"closing instance %s due to float collision with %s " +"using the same certificate" , +multi_instance_string (ex_mi, false, &gc), +multi_instance_string (mi, false, &gc));multi_close_instance (m, ex_mi, false); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I217cfb319b85fd75a88f7d4d50c374d28771df28
Gerrit-Change-Number: 1091
Gerrit-PatchSet: 2
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email )
Change subject: improve float collision logging
......................................................................
improve float collision logging
Extend the log message printed when an instance floats to an address already taken by another instance with the same certificate. The updated message now includes the instance being closed, the reason it's being closed, and the new instance taking over that address.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32226.html
---
M src/openvpn/multi.c
1 file changed, 5 insertions(+), 1 deletion(-)
src/openvpn/multi.c +5 -1
@@ -3263,7 +3263,11 @@ mroute_addr_print(&mi->real, &gc)); goto done; } -msg (D_MULTI_MEDIUM ,"closing instance %s" ,multi_instance_string (ex_mi, false, &gc)); + +msg (D_MULTI_LOW ,"closing instance %s due to float collision with %s " +"using the same certificate" , +multi_instance_string (ex_mi, false, &gc), +multi_instance_string (mi, false, &gc));multi_close_instance (m, ex_mi, false); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1091?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I217cfb319b85fd75a88f7d4d50c374d28771df28
Gerrit-Change-Number: 1091
Gerrit-PatchSet: 2
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged