Hi,

On Tue, Sep 13, 2022 at 11:33:20PM +0200, Antonio Quartulli wrote:
> in open_tun_generic() there is a check *before* reaching the code above:
> 
> "if (dev_node)"
> 
> After your patch this check becomes secondary and won't be reached if 
> $dev == "tap".
> 
> Is this wanted? It sounds like dev_node is now ignored if $dev is tap.

--dev-node on "not windows, not macos, not linux" is very ill-specified,
in other words, it usually doesn't do anything useful at all.

Basically,

 --dev-node tun3

would do exactly the same as "--dev tun3", for "tunN" devices
(where /dev/tunN exists and can be open()ed).

For tap, NetBSD does not support "tap3", so --dev-node tap<anything>
will just produce an "cannot open /dev/tap<anythign>" error message
(and even if there were a "new and improved tap driver", so you'd
want "--dev-node newtap" it would still not work as the code wouldn't
do the right "give me a dynamic device dance").

So yes, with the new code, --dev-node would be ignored for tap - which
was not actively intentional, but since there is really no way --dev-node
can be useful on NetBSD and --dev-type tap, I can live with that.


> Other than that the patch looks good and the new comment for open_tun is 
> easy to digest, also for non bsders like me.

Would that be an ACK? :-)

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

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

Reply via email to