Hi Lev, Thanks for the update. Even with the latest added fixes and sanity checks, the resulting code is now 30 lines shorter *and* more readable.
Some last questions / comments inline: On 13-12-2019 20:19, Lev Stipakov wrote: > @@ -2099,6 +2115,13 @@ io_wait_dowork(struct context *c, const unsigned int > flags) > tuntap |= EVENT_READ; > } > > +#ifdef _WIN32 > + if (tuntap_is_wintun(c->c1.tuntap)) > + { > + tuntap = EVENT_READ; > + } > +#endif Now that the code is refactored, it is clear that for the tuntap case the code will ignore any of the earlier set flags. Can you maybe add a comment explaining why the other flags are being ignored? > + /* there is a data in wintun ring buffer, read it immediately */ Grammar nit: "there is data" (remove 'a'). Otherwise, as far as stare-at-code goes, I'm fine with this patch now. I haven't tested it, nor have I reviewed Windows-specific interaction. So this needs at least one other review from someone able to review those parts. Regarding the integration into OpenVPN: Acked-by: Steffan Karger <stef...@karger.me> -Steffan _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel