Opened 8 years ago
Last modified 2 years ago
#735 accepted Bug / Defect
netbsd: named tap devices not auto-created
| Reported by: | Gert Döring | Owned by: | Gert Döring |
|---|---|---|---|
| Priority: | minor | Milestone: | release 2.7 |
| Component: | Networking | Version: | OpenVPN git master branch (Community Ed) |
| Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | |
| Cc: |
Description
running OpenVPN
--dev tap3
on NetBSD 7.0.1 only works if that device has been manually created by
ifconfig tap3 create
before - and then, it still isn't behaving "properly" because ifconfig/route changes are not cleaned up on exit.
Mainly recording this so someone can look into it.
Code in question is in tun.c around line 1600
if (!dynamic_opened)
{
/* has named device existed before? if so, don't destroy at end */
if ( if_nametoindex( dev ) > 0 )
{
msg (M_INFO, "TUN/TAP device %s exists previously, keep at program
end", dev );
tt->persistent_if = true;
}
if ((tt->fd = open (tunname, O_RDWR)) < 0)
msg (M_ERR, "Cannot open TUN/TAP dev %s", tunname);
}
adding an
#ifdef TARGET_NETBSD
..
else if strncmp(dev, tap) == 0 ... exec("ifconfig $dev create")
would work, but not make the code much prettier... (plus, it needs
destroy
at tun_close).
Change History (4)
comment:1 Changed 8 years ago by
| Component: | Generic / unclassified → Networking |
|---|
comment:2 Changed 8 years ago by
| Milestone: | release 2.4 → release 2.5 |
|---|
comment:3 Changed 4 years ago by
| Milestone: | release 2.5 → release 2.6 |
|---|---|
| Owner: | set to Gert Döring |
| Status: | new → accepted |
I forgot to actually take it (well, I hoped someone else would just do the work, I think...) - but now I do.
Too late for 2.5, but, again, nobody else complained about -> so, 2.6
comment:4 Changed 2 years ago by
| Milestone: | release 2.6 → release 2.7 |
|---|
Still an open issue, but no complaints, so not fixed for 2.6 -> bump to 2.7
this is not high prio (nobody on the NetBSD side has ever asked for it), and will not make the imminent 2.4 release - bumping to 2.5