Linux DCO: pre-existing ovpn interface handling is broken
@ralflici ci sta già lavorando.
Dal 27/6/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
When starting openvpn with a pre-existing Linux DCO interface, userspace appears to enter the intended "existing DCO device" path, but the interface is not actually adopted correctly.
Reproducer:
modprobe ovpn
ip link add tun0 type ovpn
openvpn --dev tun0 ...
The program seems to correctly detect the underlying interface:
open_tun_dco: tun0
net_iface_new: add tun0 type ovpn
sitnl_send: rtnl: generic error (-17): File exists
Cannot create DCO interface tun0: -17
DCO device tun0 already exists, won't be destroyed at shutdown
ovpn-dco device [tun0] opened
But when a client connects, DCO netlink operations fail:
dco_new_peer: peer-id 0 ...
kernel error: ovpn: ifindex does not match any interface
dco_new_peer: netlink reports device not found
Exiting due to fatal error
And despite the earlier "won't be destroyed at shutdown" message, shutdown deletes the interface:
Closing ovpn-dco interface
net_iface_del: delete tun0
So there seem to be two userspace bugs in this path:
- The
-EEXISTbranch innet_iface_new()marks the interface persistent, but does not settt->dco.ifindexfrom the existing device. Later generic netlink messages are sent with an invalid ifindex. close_tun_dco()deletes the interface unconditionally and does not honortt->persistent_if.
Note that there is also a mode wrinkle: ovpn interfaces need to be created with the correct mode (as a netlink parameter): MP for server and P2P for p2p/client. Userspace will likely need to verify that mode too when adopting a pre-existing ovpn interface.
- Lingua principale
- C
- Stelle
- 14.8k
- Fork
- 3.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenVPN/openvpn
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
-
CVE-2026-11604 vs OpenVPN 2.7.x DocumentationForse di nuovo libera @lstipakov l’ha presa 35 giorni fa e non c’è nessuna pull request aperta. ApertaDCO website Windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Document Real Address format change in management/status output (OpenVPN 2.7)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadocumentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Since 2.7.9 "route-method exe" can't set routeForse già presa @d12fk l’ha presa 1 giorno fa. Apertaoutdated code Windows
-
enhancement feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Tutte le issue di OpenVPN/openvpn
Issue simili
-
issue: bug report
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Stellarium/stellarium#5197 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ChupathingyCE/chupathingyce#1550 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] SWAPDB sends no invalidation to CLIENT TRACKING clientsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
redis/redis#16302 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno