Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 181195

Summary: openvpn --mktun does not work with all applications that need tap interfaces.
Product: Gentoo Linux Reporter: Giuliano Gagliardi <gentoo>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Make tunctl the default for tun/tap creation.
Corrected version

Description Giuliano Gagliardi 2007-06-07 13:01:15 UTC
When a tap interface is created with openvpn --mktun (what the initscripts do by default if it is available), it can not be used by UML or VDE. It can be used with openvpn itself though. #define SIOCSIFTXQLEN 0 in openvpn fixes the problem. My suggestions is to make tunctl from usermode-utilities the default, because it works with everything I have tested.

Reproducible: Always

Steps to Reproduce:
Comment 1 Giuliano Gagliardi 2007-06-07 13:02:06 UTC
Created attachment 121404 [details, diff]
Make tunctl the default for tun/tap creation.
Comment 2 SpanKY gentoo-dev 2007-06-08 01:06:34 UTC
Comment on attachment 121404 [details, diff]
Make tunctl the default for tun/tap creation.

this patch is whitespace damaged
Comment 3 Giuliano Gagliardi 2007-06-08 09:54:23 UTC
Created attachment 121480 [details, diff]
Corrected version
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-07-02 13:14:52 UTC
(In reply to comment #0)
> When a tap interface is created with openvpn --mktun (what the initscripts do
> by default if it is available), it can not be used by UML or VDE.

Why? What is wrong with the tap interface?
The reason why we prefer openvpn is simply because it's available on many more platforms.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-07-20 13:27:30 UTC
Please tell us why openvpn created tun/tap devices fail for you.
Comment 6 Giuliano Gagliardi 2007-07-20 22:21:18 UTC
Sorry, I didn't see your first post. in tun.c from openvpn there is a line:
if (ioctl (ctl_fd, SIOCSIFTXQLEN, (void *) &netifr) >= 0)
If I remember correctly, commenting that out will fix it. I could be wrong though.

When it is not fixed, any other application using an openvpn-created tap device can't send any packets through it. I have tried UML and QEMU.
Comment 7 Roy Marples (RETIRED) gentoo-dev 2007-07-20 23:35:19 UTC
All openvpn versions in the tree create tun/tap interfaces with the correct defaults now as I patched them for this. The default is 100. What do you think the correct value or behaviour should be?
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-08-02 10:39:50 UTC
Need more info, sorry