Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2 |
|
#
98a21dda |
| 12-Aug-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Fix multiple issues with if_tap and if_tun cloning
* tap and tun were being auto-destroyed when manually created via ifconfig blah create, and not being auto-destroyed when auto-created
kernel - Fix multiple issues with if_tap and if_tun cloning
* tap and tun were being auto-destroyed when manually created via ifconfig blah create, and not being auto-destroyed when auto-created via open /dev/tap or open /dev/tun. Reverse the flag so it works properly.
* The bitmap for the ifconfig based cloner and the bitmap maintained internally by if_tap and if_tun could get out of sync with each other due to if_clone_free_unit(ifp, ...) being issued after the ifc_destroy() (the ifp is garbage at that point).
* Remove a KASSERT() that can be triggered trivially from usermode (as root) in the interface cloning path.
Reported-by: zrj
show more ...
|
#
bb54c3a2 |
| 02-Jul-2020 |
Aaron LI <aly@aaronly.me> |
if_clone: Extend if_clone_create() by an extra parameter
Currently, if_clone_create() accepts one caddr_t parameter that is passed with the ifreq->ifr_data for the SIOCIFCREATE2 ioctl.
Extend this
if_clone: Extend if_clone_create() by an extra parameter
Currently, if_clone_create() accepts one caddr_t parameter that is passed with the ifreq->ifr_data for the SIOCIFCREATE2 ioctl.
Extend this function by another caddr_t parameter so that callers could pass extra data to the ifc->ifc_create() handler and won't conflict with the SIOCIFCREATE2 ioctl calls. This extension will be used by tun(4) and tap(4) in a following commit.
Suggested-by: dillon Reviewed-by: dillon
show more ...
|
#
f835013f |
| 27-Jun-2020 |
Aaron LI <aly@aaronly.me> |
if_clone: Fix a missing allocated unit free upon error
|
Revision tags: v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3 |
|
#
b8b9f56e |
| 07-Feb-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Clean up memory leaks and a stack buffer disclosure bug
* Clean up memory leaks, a stack buffer disclosure bug, and a missing priv check in if_oce (which probably never attaches these d
kernel - Clean up memory leaks and a stack buffer disclosure bug
* Clean up memory leaks, a stack buffer disclosure bug, and a missing priv check in if_oce (which probably never attaches these days). All in the network subsystem.
Reported-by: Ilja van Sprundel
show more ...
|
Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1 |
|
#
5e983a2e |
| 21-Jun-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Add cloned interface to the group of its device name
When a new interface is cloned, add it to the group of its device name, e.g., cloned interfaces tapX will belong to group of "tap" by d
if_clone: Add cloned interface to the group of its device name
When a new interface is cloned, add it to the group of its device name, e.g., cloned interfaces tapX will belong to group of "tap" by default.
show more ...
|
#
1047b69e |
| 06-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Refactor out if_clone_createif() function
The new if_clone_createif() function will create a clone interface with the given cloner and unit.
|
#
595dc8f1 |
| 05-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Check cloner name to avoid duplicate in if_clone_attach()
Change if_clone_attach() to check the cloner name instead of the pointer to avoid duplicate, also to return EEXIST instead of pani
if_clone: Check cloner name to avoid duplicate in if_clone_attach()
Change if_clone_attach() to check the cloner name instead of the pointer to avoid duplicate, also to return EEXIST instead of panic.
show more ...
|
#
9ad42ca2 |
| 05-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Refactor out if_clone_{alloc,free}_unit() functions
Refactor out if_clone_{alloc,free}_unit() functions from if_clone_{create,destroy}() functions.
|
#
1e4b15c7 |
| 05-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Remove useless code wrongly added in 84cb91c376f
The code was inteded to obtain the created interface and add an interface group for it, which is a work in progress.
|
#
3b1300da |
| 04-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Fix if_clone_destroy() with renamed cloned interface
Since the interface can be renamed (SIOCSIFNAME), it's very wrong for if_clone_destroy() to determine the unit number from interface na
if_clone: Fix if_clone_destroy() with renamed cloned interface
Since the interface can be renamed (SIOCSIFNAME), it's very wrong for if_clone_destroy() to determine the unit number from interface name, which has the following two serious problems:
(1) One may only change the unit number in the interface name, then trying to destroy the interface will panic the system. e.g., % ifconfig tap0 create % ifconfig tap0 name tap99999999 % ifconfig tap99999999 destroy -> panic: if_clone_destroy: bit is already cleared
(2) The renamed interface cannot be destroyed anymore. e.g., % ifconfig tap0 create % ifconfig tap0 name test % ifconfig test destroy -> ifconfig: SIOCIFDESTROY: Invalid argument
Fix the code to use the 'if_dunit' as the correct interface unit number.
Thanks to Jason A. Donenfeld <jason@zx2c4.com> and Brady OBrien <brady.obrien128@gmail.com> for pointing out the above problem (1).
show more ...
|
#
2010725f |
| 04-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Refactor cloner lookup and unit extraction
Break down the old 'if_clone_lookup()' function into the following 3 functions:
- if_name2unit(): extract the unit number from the interface nam
if_clone: Refactor cloner lookup and unit extraction
Break down the old 'if_clone_lookup()' function into the following 3 functions:
- if_name2unit(): extract the unit number from the interface name. Obtained from FreeBSD and has fixes (disallow leading zeros; avoid unit overflow).
- if_clone_match(): check whether the cloner matches the interface name.
- new if_clone_lookup(): only lookup the cloner for the interface name.
show more ...
|
#
e224e5e7 |
| 04-Aug-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Remove unneeded "ifc_namelen" from "struct if_clone"
The "strlen(ifc_name)" is used instead.
|
#
84cb91c3 |
| 22-Jun-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Refactor if_clone_create()
In the wildcard case (the caller passes the interface name without a unit number), if_clone_create() should update the passed name parameter with the allocated u
if_clone: Refactor if_clone_create()
In the wildcard case (the caller passes the interface name without a unit number), if_clone_create() should update the passed name parameter with the allocated unit number in order to make the caller know the name of the cloned interface, e.g., ifconfig(8) compares the passed and returned interface name. Therefore the caller should preserve enough space (given by the "len" parameter) to hold the full interface name. This shouldn't be a problem since the caller generally use the "struct if_clonereq" which has enough space for the name.
For the name update code, use simple and clear strlcpy() to replace the hack with a for loop and obscure snprintf(), and return ENOSPC instead of panic.
Simplify the ifnet lock a bit.
show more ...
|
Revision tags: v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc |
|
#
5a57776a |
| 20-Mar-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Explicitly include <sys/eventhandler.h>
Eventhandler is used there, so include the <sys/eventhandler.h> header explicitly.
Minor style updates.
|
#
0de0168f |
| 21-Jun-2018 |
Aaron LI <aly@aaronly.me> |
if_clone: Fix if_clone_event invocation
As the parameter passed to the "if_clone_event" handler indicates, this event should be triggered when a new interface cloner is *attached*, rather than when
if_clone: Fix if_clone_event invocation
As the parameter passed to the "if_clone_event" handler indicates, this event should be triggered when a new interface cloner is *attached*, rather than when a clone interface is created. (Based on FreeBSD)
Update the eventhandler.9 man page accordingly.
show more ...
|
#
bff82488 |
| 20-Mar-2018 |
Aaron LI <aly@aaronly.me> |
<net/if.h>: Do not include <net/if_var.h> for _KERNEL
* Clean up an ancient leftover: do not include <net/if_var.h> from <net/if.h> for kernel stuffs.
* Adjust various files to include the necess
<net/if.h>: Do not include <net/if_var.h> for _KERNEL
* Clean up an ancient leftover: do not include <net/if_var.h> from <net/if.h> for kernel stuffs.
* Adjust various files to include the necessary <net/if_var.h> header.
NOTE: I have also tested removing the inclusion of <net/if.h> from <net/if_var.h>, therefore add <net/if.h> inclusion for those files that need it but only included <net/if_var.h>. For some files, the header inclusion orderings are also adjusted.
show more ...
|
Revision tags: v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4 |
|
#
b4051e25 |
| 22-Jan-2015 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
ifnet: Make ifnet and ifindex2ifnet MPSAFE
- Accessing to these two global variables from non-netisr threads uses ifnet lock. This kind of accessing is from - Accessing to ifindex2ifnet from neti
ifnet: Make ifnet and ifindex2ifnet MPSAFE
- Accessing to these two global variables from non-netisr threads uses ifnet lock. This kind of accessing is from - Accessing to ifindex2ifnet from netisrs are lockless MPSAFE. - Netisrs no longer access ifnet, instead they access ifnet array as of this commit, which is lockless MPSAFE.
Rules for accessing ifnet and ifindex2ifnet is commented near the declaration of the related global variables/functions in net/if_var.h.
show more ...
|
Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2 |
|
#
51edabe8 |
| 10-Nov-2014 |
Markus Pfeiffer <markus.pfeiffer@morphism.de> |
net/if_clone: Panic if the same cloner is attached twice
if_clone_attach used to allow attaching the same cloner twice, which then lead to infinite loops when trying to create a clone with an invali
net/if_clone: Panic if the same cloner is attached twice
if_clone_attach used to allow attaching the same cloner twice, which then lead to infinite loops when trying to create a clone with an invalid name. This patch adds a check whether the cloner is already attached, and if so, panics.
show more ...
|
Revision tags: v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3 |
|
#
dc71b7ab |
| 31-May-2013 |
Justin C. Sherrill <justin@shiningsilence.com> |
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Apparently everyone's doing it: http://svnweb.freebsd.org/base?view=revision&revision=251069
Submitted-by: "Eitan Adler" <lists at eitanadl
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Apparently everyone's doing it: http://svnweb.freebsd.org/base?view=revision&revision=251069
Submitted-by: "Eitan Adler" <lists at eitanadler.com>
show more ...
|
Revision tags: v3.4.2 |
|
#
2702099d |
| 06-May-2013 |
Justin C. Sherrill <justin@shiningsilence.com> |
Remove advertising clause from all that isn't contrib or userland bin.
By: Eitan Adler <lists@eitanadler.com>
|
Revision tags: v3.4.0, v3.4.1, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0 |
|
#
86d7f5d3 |
| 26-Nov-2011 |
John Marino <draco@marino.st> |
Initial import of binutils 2.22 on the new vendor branch
Future versions of binutils will also reside on this branch rather than continuing to create new binutils branches for each new version.
|
Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0, v2.3.2, v2.3.1, v2.2.1 |
|
#
2038fb68 |
| 06-Apr-2009 |
Sascha Wildner <saw@online.de> |
Replace all casts of NULL to something with NULL.
|
Revision tags: v2.2.0, v2.3.0, v2.1.1, v2.0.1 |
|
#
65a24520 |
| 11-Jan-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
- Split if_clone.c out of if.c, license in if.c is attached to if_clone.c - Split if_clone.h out of if.h and if_var.h, license of if_var.h is attached to if_clone.h - Staticize some variables and f
- Split if_clone.c out of if.c, license in if.c is attached to if_clone.c - Split if_clone.h out of if.h and if_var.h, license of if_var.h is attached to if_clone.h - Staticize some variables and function in if_clone.c - if_clonereq is the only userland visible structure related to this commit; it is kept in if.h for now, so userland application won't be aware of this commit. It will be moved to net/if_clone.h
No functional changes.
# if_clone.c is subjected to change to support clone creation with # additional parameters.
show more ...
|
#
a7e9152e |
| 14-Dec-2010 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
if_clone: Don't destroy iface which is not create through if_clone mechanism
DragonFly-bug: http://bugs.dragonflybsd.org/issue1919
|
#
c5e14c14 |
| 25-Feb-2010 |
Rui Paulo <rpaulo@FreeBSD.org> |
Extend if_clone by passing in a param arg in the create routine. This param is only used when the ioctl is SIOCIFCREATE2.
|