I'm not really sure if this change *helps* understandability of the
resulting code - now we do the bind_local() thing for *some* sockets
in create_socket(), and for others in "...udp_configured()" - and ditto
for socket_apply_options()...

It took me quite a bit of staring at code to come to the conclusion
"for all possible variants, it should still do the same in the end"
(but I might have overlooked something).  t_client/t_server claim that
everything still works, though.

Also, reconstructing "ai" in create_socket_udp_configured() looks
just *wrong* if we have a perfectly fine addrinfo in the caller?  It
should not have any adverse effects, but still...


Your patch has been applied to the master branch.

commit af1f73dbe442b42b8a1addc614aa13c3485db266
Author: Lev Stipakov
Date:   Sat Sep 12 11:29:12 2026 +0200

     socket: factor out UDP socket creation and setup

     Signed-off-by: Lev Stipakov <[email protected]>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1910
     Message-Id: <[email protected]>
     URL: 
https://www.mail-archive.com/[email protected]/msg39126.html
     Signed-off-by: Gert Doering <[email protected]>


--
kind regards,

Gert Doering



_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to