Hi,

On Tue, Jul 12, 2022 at 11:46:42PM +0200, Antonio Quartulli wrote:
> open_tun_generic already contains the logic required to find a device
> name when not specified b the user. For this reason the DCO case can
> easily leverage on function and avoid code duplication.
> 
> Signed-off-by: Antonio Quartulli <a...@unstable.cc>

NAK... I'm not sure what is happening, but if I apply this on top
of current master, and build without(!) DCO, it will kill linux/sitnl
operation hard for the "--dev tun30" case.

Running "openvpn --client ... --dev tun30" leads to

2022-07-14 15:59:43 Incoming Data Channel: Cipher 'AES-256-GCM' initialized 
with 256 bit key
2022-07-14 15:59:43 net_route_v4_best_gw query: dst 0.0.0.0
2022-07-14 15:59:43 net_route_v4_best_gw result: via 194.97.140.30 dev 
eno33554952
2022-07-14 15:59:43 GDG6: remote_host_ipv6=2607:fc50:1001:5200::4
2022-07-14 15:59:43 net_route_v6_best_gw query: dst 2607:fc50:1001:5200::4
2022-07-14 15:59:43 net_route_v6_best_gw result: via 2001:608:0:814::ffff dev 
eno33554952
2022-07-14 15:59:43 DCO device tun30 opened
2022-07-14 15:59:43 net_iface_mtu_set: rtnl: cannot get ifindex for tun30: No 
such device (errno=19)
2022-07-14 15:59:43 Linux can't set mtu (1500) on tun30
2022-07-14 15:59:43 Exiting due to fatal error


Building with --enable-dco breaks all operations on linux (because it 
gets confused between DCO and non DCO operation modes)...

2022-07-14 16:04:05 Assertion failed at dco_linux.c:453 (tt->type == 
DEV_TYPE_TUN)

and sometimes

2022-07-14 16:06:26 sitnl_send: rtnl: generic error (-95): Operation not 
supported
2022-07-14 16:06:26 net_iface_new: add tun255 type ovpn-dco
2022-07-14 16:06:26 sitnl_send: rtnl: generic error (-95): Operation not 
supported
2022-07-14 16:06:26 Cannot allocate TUN/TAP dev dynamically

(isn't "-95" an indication of "no DCO module available" and we should not
try to iterate up to tun255 in this case, but give up with a clear
error indication instead?)

thus

Test sets succeeded: none.
Test sets failed: 1 1a 1b 1c 1d 1e 2 2a 2b 2c 2d 2e 2f 3 4 4a 4b 5 6 8 8a 9 9a 
9b 9x 11 11a.

... but since this is not default, I do not consider this a "this patch
breaks things" problem.  It compiles.

There is no --disable-dco option yet, so hard to test "would it work in
that case?" - so I consider this part not really interesting yet.


But the "not built with DCO, --dev tun30" part should really not fail.

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