Hi,

> What I do not really like is the inflation of the code with
>
>         if (!tt->wintun)
>
> statements now.  I think this should be refactored out into an
> "open_tun_wintun()" and an "open_tun_tap_windows()" function, where
> all the bits that are now inside an "if (!tt->wintun)" get their
> own function with less if() and less nesting.
>

I agree.

I have sent a (yet another) patch (https://patchwork.openvpn.net/patch/918/
)
which refactors open_tun() method, which now looks like this:

    tun_open_device(tt, dev_node, &device_guid);

    if (tt->wintun)
    {
        wintun_register_ring_buffer(tt);
    }
    else
    {
        tuntap_post_open(tt, device_guid);
    }

Note that it requires 6 of 7 wintun patches to be merged.

Alternatively I can rebase wintun 4/5/6 patches on top of this one.

-- 
-Lev
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to