| ab54f4c8 | 12-Aug-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Fix multiple issues with if_tap and if_tun cloning (2)
* For tap and tun, detect whether created by ifconfig or open("/dev/tap"...) etc and set MANUALMAKE flag appropriately.
* When clos
kernel - Fix multiple issues with if_tap and if_tun cloning (2)
* For tap and tun, detect whether created by ifconfig or open("/dev/tap"...) etc and set MANUALMAKE flag appropriately.
* When closing a tap or tun interface and MANUALMAKE is not set, destroy the device, softc, and interface via if_clone_destroy(). This fixes another issue where the various bitmaps could get out of sync.
show more ...
|
| a13a0bb2 | 28-Jun-2020 |
Aaron LI <aly@aaronly.me> |
tun/tap: Don't repeat ifnet_attach_event and IFAN_ARRAIVAL
* The if_attach() called in tuncreate() already invokes 'ifnet_attach_event' and announces IFAN_ARRAIVAL; * The ether_ifattach() called i
tun/tap: Don't repeat ifnet_attach_event and IFAN_ARRAIVAL
* The if_attach() called in tuncreate() already invokes 'ifnet_attach_event' and announces IFAN_ARRAIVAL; * The ether_ifattach() called in tapcreate() invokes if_attach() and thus would also do the above.
show more ...
|
| 62899344 | 27-Jun-2020 |
Aaron LI <aly@aaronly.me> |
tun/tap: Use if_clone framework to clone from autoclone device
Before this change, the clone methods from autoclone device and if_clone is quite different, so the allocated device unit numbers are n
tun/tap: Use if_clone framework to clone from autoclone device
Before this change, the clone methods from autoclone device and if_clone is quite different, so the allocated device unit numbers are not synced between them, and the default interface group is not added for the interfaces created via the autoclone device.
For example: tinc/openvpn will open '/dev/tun' to clone a device '/dev/tun0' and an interface 'tun0', but the 'tun0' interface doesn't own the 'tun' default group. And then, 'ifconfig tun create' will fail with 'SIOCIFCREATE2: File exists'.
Fix the above conflicts/inconsistencies by using the same if_clone logic for device cloning from the autoclone device. Now the two clone methods are consistent and can be mix used.
Bug: https://bugs.dragonflybsd.org/issues/3230
show more ...
|
| e877c31a | 27-Jun-2020 |
Aaron LI <aly@aaronly.me> |
tun/tap: Return EEXIST in clone creation if softc found
With the old logic, an existing softc (e.g., created by cloning via autoclone device) may be used and then be modified later, which should be
tun/tap: Return EEXIST in clone creation if softc found
With the old logic, an existing softc (e.g., created by cloning via autoclone device) may be used and then be modified later, which should be better avoided.
show more ...
|
| ef832711 | 27-Jun-2020 |
Aaron LI <aly@aaronly.me> |
tun/tap: Fix errno NODEV to NOENT in clone creation
I was thinking 'NODEV' means 'no such device' but it actually means 'operation not supported by device'... So change this errno to 'NOENT'.
Whil
tun/tap: Fix errno NODEV to NOENT in clone creation
I was thinking 'NODEV' means 'no such device' but it actually means 'operation not supported by device'... So change this errno to 'NOENT'.
While there, adjust the code a bit in if_tap.c to align with if_tun.c.
show more ...
|
| d4daa541 | 19-Jul-2018 |
Aaron LI <aly@aaronly.me> |
if_tap: Restore SIOCGIFFLAGS, SIOC[GS]IFADDR ioctls for tapioctl()
These ioctls allow basic control of the network interface via the device file (/dev/tapX). For example, our vke(4) device currentl
if_tap: Restore SIOCGIFFLAGS, SIOC[GS]IFADDR ioctls for tapioctl()
These ioctls allow basic control of the network interface via the device file (/dev/tapX). For example, our vke(4) device currently uses the 'SIOCGIFADDR' ioctl.
show more ...
|
| b2bc15c2 | 17-Jul-2018 |
Aaron LI <aly@aaronly.me> |
Revert "if_tap: Get rid of arpcom struct from tap_softc struct"
This reverts commit 78e1ab4a8fc0074361116dedb55e6dc02baea351, with minor adjustments to reduce the diff.
Thank sephe for pointint out
Revert "if_tap: Get rid of arpcom struct from tap_softc struct"
This reverts commit 78e1ab4a8fc0074361116dedb55e6dc02baea351, with minor adjustments to reduce the diff.
Thank sephe for pointint out the problem with that commit, which breaks the 'ether_ifattach()' as well as some IPv6 stuffs that assume the existence of 'arpcom'.
show more ...
|
| fbae8fc9 | 17-Jul-2018 |
Aaron LI <aly@aaronly.me> |
if_tap: Disallow change network device type
Disallow ioctl(2) to change the network device type of tap(4). Otherwise, page faults and panics can happen when access uninitialized fields in the "struc
if_tap: Disallow change network device type
Disallow ioctl(2) to change the network device type of tap(4). Otherwise, page faults and panics can happen when access uninitialized fields in the "struct ifnet" which are specific to the network device type.
Obtained-from: FreeBSD (revision 326362)
show more ...
|
| 96426785 | 13-Jul-2018 |
Aaron LI <aly@aaronly.me> |
if_tap: Add TAPGIFNAME ioctl to get interface name
This is a convenient shortcut to obtain the network interface name using file descriptor for character device.
This ioctl is obtained from FreeBSD
if_tap: Add TAPGIFNAME ioctl to get interface name
This is a convenient shortcut to obtain the network interface name using file descriptor for character device.
This ioctl is obtained from FreeBSD (revision 182880) which was further obtained from NetBSD. This ioctl is used by softwares such as QEMU.
Bump __DragonFly_version and update tap.4 man page.
show more ...
|