Bug 32673 - /dev/net/tun is created as a regular file if missing
Summary: /dev/net/tun is created as a regular file if missing
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: vpnc-script (show other bugs)
Version: unstable
Hardware: all Linux
: P3 minor
Assignee: Alexey Shabalin
QA Contact: qa-sisyphus
Depends on:
Reported: 2016-10-27 14:43 MSK by Ivan Zakharyaschev
Modified: 2016-10-27 14:43 MSK (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2016-10-27 14:43:27 MSK

In a system without systemd (and without any preceding "modprobe tun"), openconnect (which must be using vpnc-script):

* would fail with unclear errors like this:

	ioctl(5, TUNSETIFF, 0x7fffbc71f7d0) = -1 ENOTTY (Inappropriate ioctl for device)

* and would have created /dev/net/tun as a regular file like this:

	open("/dev/net/tun", O_RDWR|O_CREAT, 0666) = 3

(which would prevent the creation of a correct device afterwards).

A similar case (probably, the same bug) has been reported as a Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780709


rm /dev/net/tun # if it's a wrong regular file
modprobe -r tun
modprobe tun