[M] Change in openvpn[master]: Multisocket: use event engine rwflags for UDP I/O

"cron2 \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <ec5806e541e5936b57e01d8664cb68f22baa45af-EmailReviewComments-HTML@gerrit.openvpn.net>
Attention is currently required from: its_Giaan, ordex, plaisthos.

cron2 has posted comments on this change by its_Giaan. ( http://gerrit.openvpn.net/c/openvpn/+/1635?usp=email )

Change subject: Multisocket: use event engine rwflags for UDP I/O
......................................................................


Patch Set 5: Code-Review-1

(5 comments)

File src/openvpn/forward.h:

http://gerrit.openvpn.net/c/openvpn/+/1635/comment/29dd8fc7_d3d600d3?usp=email :
PS5, Line 78: 
can we have proper documentation comments here?


File src/openvpn/forward.c:

http://gerrit.openvpn.net/c/openvpn/+/1635/comment/7defcd1c_cc9f7cff?usp=email :
PS5, Line 2035: {
This function most definitely needs a comment to explain what it does, and where it is called from (here or in forward.h).


http://gerrit.openvpn.net/c/openvpn/+/1635/comment/0a8e9c78_fb46a0ad?usp=email :
PS5, Line 2132:  */
We need to extend this comment a bit - the fact that it deals with only one socket confuses me every time, and then I go "git grep" and read up on the callers.

Maybe something like `it is either called from tunnel_point_to_point() (p2p mode) or with the per-client-context from multi_io.c` or something like that.


File src/openvpn/mudp.c:

http://gerrit.openvpn.net/c/openvpn/+/1635/comment/e3384f44_0cc9c3e9?usp=email :
PS5, Line 364: p2mp_iow_flags(const struct multi_context *m, struct link_socket *sock)
let's move this function to multi_io.c - this is the only place it's called from


http://gerrit.openvpn.net/c/openvpn/+/1635/comment/6767bb95_e5e79af3?usp=email :
PS5, Line 375:         if (LINK_OUT(&m->pending->context) && m->pending->context.c2.link_sockets[0] == sock)
I have my doubts about this change - IOW, I am not understanding this at all.

We call this function in a loop "for all UDP sockets", and then this part does nothing unless the socket passed in happens to be "link_sockets[0]".  This is really hard to understand code - and if link_sockets[0] happens to be a TCP socket, this does nothing at all.  No?

In any case this needs a comment :-) - if I can't understand it, how can we expect future maintainers to understand it.



-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1635?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6b303805a3688b6f6363140c76853a58badecd8f
Gerrit-Change-Number: 1635
Gerrit-PatchSet: 5
Gerrit-Owner: its_Giaan <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: ordex <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: its_Giaan <[email protected]>
Gerrit-Attention: ordex <[email protected]>
Gerrit-Comment-Date: Fri, 12 Jun 2026 18:05:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.