Opened 13 years ago

Closed 9 years ago

#85 closed Bug / Defect (fixed)

mktun in freebsd

Reported by: krzee king Owned by: Gert Döring
Priority: minor Milestone: release 2.3.7
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: freebsd
Cc:

Description

[root@butters ~]# openvpn --mktun --dev tun0
Options error: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: mktun (2.1.4)

root@hemp:~> openvpn --mktun --dev tun5
Options error: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: mktun (testing-72445b0d7a37)

[07:56] <cron2> the whole "tunnel persistance" code is a mess, because most of it is linux specific, and it's not really generalized for all OSes

Attachments (1)

0001-Print-helpful-error-message-on-mktun-rmtun-if-not-av.patch (2.6 KB) - added by Gert Döring 9 years ago.
print helpful message on --mktun on non-linux

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by David Sommerseth

Owner: set to Gert Döring
Status: newassigned

comment:2 Changed 11 years ago by mandree

This still happens on FreeBSD 9.1 amd64 with OpenVPN 2.3.0 (port version 2.3.0_3).

comment:3 Changed 11 years ago by Gert Döring

Well, I'm tempted to just close this as the whole functionality is not needed on FreeBSD - if you want a persistent tun interface, just run "ifconfig tun5 create", and there you go.

This can't be done on Linux, which is why it has "--mktun".

Is that good enough as an explanation? (Sorry for not following up in a more timely fashion, though).

comment:4 Changed 11 years ago by Samuli Seppänen

I tend to agree with cron2, no need to reinvent the wheel on platforms which can do without it.

comment:5 Changed 11 years ago by Samuli Seppänen

Keywords: freebsd added
Version: 2.1.0 / 2.1.1git master branch

Oh, and we should add a mention of this to the man-page. For example: "--mktun only works and is needed on Linux. On other platforms such as FreeBSD you can create a persistent tun device with ifconfig, e.g. ifconfig tun5 create".

comment:6 Changed 11 years ago by David Sommerseth

I don't mind making --mktun a Linux only feature. But we should do some code changes too then, to avoid presenting --mktun on non-Linux installations.

However, it is possible to make persistent tun/tap devices without OpenVPN on Linux - but you need to use 'tunctl' instead of 'ifconfig'.

I'm actually wondering how useful it is to have --mktun at all though, considering we have add_tun.bat (or something like that) for Windows, *BSD uses 'ifconfig', and Linux can use 'tunctl'. Not sure about Solaris though, but probably similar tools exists there too. And then rather document in the man page how to make persistent devices on supported platforms natively, in an own section. Unless this will cause panic in the embedded world, where space is important and tunctl is too much to carry.

comment:7 Changed 10 years ago by Gert Döring

Milestone: release 2.3.3

This is fairly trivial, so I'd like to see it go into 2.3.3

  • have --mktun/--rmtun return a nice diagnostic messages on non-built-in platforms
  • include example configs in the manpage

sitting on my lap anyway. For way too long. Bah.

comment:8 Changed 10 years ago by Gert Döring

Milestone: release 2.3.3release 2.3.5

sorry for dragging along. Too busy. Will go to 2.3.5

comment:9 Changed 9 years ago by Gert Döring

Milestone: release 2.3.5release 2.3.7

Changed 9 years ago by Gert Döring

print helpful message on --mktun on non-linux

comment:10 Changed 9 years ago by Gert Döring

So, here's a patch, also sent to the list. ACK if you think it should go in :-) - otherwise I'll just close this itch.

comment:11 Changed 9 years ago by Gert Döring

Resolution: fixed
Status: assignedclosed

committed and pushed, will be part of 2.3.7

commit 4ad2b65d9deb3197d847d7dcc36715aa5394836f (master)
commit 1a7fc1ea2207580693b2801099f8a473f1c07828 (release/2.3)

Author: Gert Doering
Date: Tue Apr 28 13:04:23 2015 +0200

Print helpful error message on --mktun/--rmtun if not available.

Signed-off-by: Gert Doering <gert@…>
Acked-by: David Sommerseth <dazo@…>
Message-Id: <1430219063-12291-1-git-send-email-gert@…>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9617

Note: See TracTickets for help on using tickets.