Opened 12 months ago
Closed 11 months ago
#18673 closed bug (fixed)
Clean up TUN subsystem
Reported by: | waddlesplash | Owned by: | waddlesplash |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Network & Internet/Tunnel | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
The new TUN subsystem has a number of things that should be fixed.
- TAP-related code.
Does this actually work? (It doesn't look like it.) FreeBSD does have a unified TUN/TAP driver in their kernel, but there's a lot of TAP-related branching that we do not have. It may make more sense to remove a lot of this (as it doesn't appear to be correct anyway) until/when we actually implement TAP support.
- Separate driver interface.
There's a lot of places where the network device module reads/writes into the driver interface or otherwise interacts with it across a FD boundary. This should be done away with, and the published device in devfs managed directly from the network device module. This should simplify a lot of code.
- Proper path placement.
Reading FreeBSD's manual page, TUN interfaces behave like any other network interface (can be used with ifconfig, etc.) We thus shouldn't have /dev/tun0
, but rather /dev/net/tun/0
etc. (As TUN interfaces are created on-demand, there won't be a /dev/net/tun
directory at all unless one is created.)
Attachments (3)
Change History (7)
comment:1 by , 12 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 months ago
Attaching an openvpn patch to help. This refactor the one in haikuports to be "more sane" (and follow this new naming)
- fixing the odd static tap to a dynamic tun
- making the dynamic_name equal to the full path (later in the code it mentions dynamic_name is used simply for ifconfig calls.. our ifconfig uses full device paths)
Feel free to use, or adjust
by , 12 months ago
Attachment: | 0001-Haiku-Introduce-basic-platform-support.patch added |
---|
openvpn patches
by , 12 months ago
Attachment: | 0001-tun-adjust-tun-device-name-to-dev-net-tun-0.patch added |
---|
haiku patches i was playing with, likely less useful
comment:3 by , 12 months ago
This link can be used for references or implementation ideas: http://www.dest-unreach.org/socat/doc/socat-tun.html
http://www.dest-unreach.org/socat/doc/socat.html#ADDRESS_TUN
comment:4 by , 11 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Overhaul done in hrev57427.
Reassigning to myself. I guess I will take a look at these things next week.