… | |
… | |
72 | { |
72 | { |
73 | slog (L_CRIT, _("unable to configure tun/tap interface: %s"), strerror (errno)); |
73 | slog (L_CRIT, _("unable to configure tun/tap interface: %s"), strerror (errno)); |
74 | exit (1); |
74 | exit (1); |
75 | } |
75 | } |
76 | |
76 | |
77 | if (conf.ifpersist) |
|
|
78 | if (ioctl (fd, TUNSETPERSIST, 1)) |
77 | if (ioctl (fd, TUNSETPERSIST, conf.ifpersist ? 1 : 0)) |
79 | slog (L_WARN, _("cannot set persistent mode for device %s: %s"), ifrname, strerror (errno)); |
78 | slog (L_WARN, _("cannot set persistency mode for device %s: %s"), ifrname, strerror (errno)); |
80 | |
79 | |
81 | slog (L_DEBUG, _("%s is a %s"), device, info ()); |
80 | slog (L_DEBUG, _("%s is a %s"), device, info ()); |
82 | } |
81 | } |
83 | |
82 | |
84 | tap_device::~tap_device () |
83 | tap_device::~tap_device () |