#
db0ac6de |
| 02-Dec-2021 |
Cy Schubert <cy@FreeBSD.org> |
Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"
This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.
A mism
Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"
This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.
A mismerge of a merge to catch up to main resulted in files being committed which should not have been.
show more ...
|
#
266f97b5 |
| 02-Dec-2021 |
Cy Schubert <cy@FreeBSD.org> |
wpa: Import wpa_supplicant/hostapd commit 14ab4a816
This is the November update to vendor/wpa committed upstream 2021-11-26.
MFC after: 1 month
|
#
9e93d2b3 |
| 02-Dec-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet: enable & fix if_debug build
Fixes: ce40632a316c5
|
#
3bc40f39 |
| 23-Nov-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
if_free: add a comment explaining why ifindex_free() is performed here
|
#
fe499a84 |
| 23-Nov-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet: merge if_destroy() and if_free_internal() into one
New function has more meaningful name if_free_deferred() and has its header comment fixed to reflect reality. NFC
|
#
4787572d |
| 23-Nov-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet: make if_alloc_domain() never fail
The last consumer of if_com_alloc() is firewire. It never fails to allocate. Most likely the if_com_alloc() KPI will go away together with if_fwip(), less
ifnet: make if_alloc_domain() never fail
The last consumer of if_com_alloc() is firewire. It never fails to allocate. Most likely the if_com_alloc() KPI will go away together with if_fwip(), less likely new consumers of if_com_alloc() will be added, but they would need to follow the no fail KPI.
show more ...
|
#
1e3ca25d |
| 23-Nov-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet: make if_alloc_domain() static
|
#
ce40632a |
| 23-Nov-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet: append if_debug.c to if.c
With this change if_index can become static. There is nothing that if_debug.c would want to isolate from if.c. Potentially if.c wants to share everything with if_d
ifnet: append if_debug.c to if.c
With this change if_index can become static. There is nothing that if_debug.c would want to isolate from if.c. Potentially if.c wants to share everything with if_debug.c.
Move Bjoern's copyright to if.c.
Reviewed by: bz
show more ...
|
#
8a6f38c8 |
| 23-Nov-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet: garbage collect drbr_*_drv().
They were left in 62d76917b8678 but after years proved not to be useful.
|
#
5a4e46f6 |
| 14-Nov-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: whack "set but not used" warnings in net/if.c
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
b1e6a792 |
| 10-Sep-2021 |
Mark Johnston <markj@FreeBSD.org> |
net: Enter a net epoch around protocol if_up/down notifications
When traversing a list of interface addresses, we need to be in a net epoch section, and protocol ctlinput routines need a stable refe
net: Enter a net epoch around protocol if_up/down notifications
When traversing a list of interface addresses, we need to be in a net epoch section, and protocol ctlinput routines need a stable reference to the address.
Reported by: syzbot+3219af764ead146a3a4e@syzkaller.appspotmail.com Reviewed by: kp, melifaro MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31889
show more ...
|
#
01ad0c00 |
| 26-Jul-2021 |
Kristof Provost <kp@FreeBSD.org> |
net: disallow MTU changes on bridge member interfaces
if_bridge member interfaces should always have the same MTU as the bridge itself, so disallow MTU changes on interfaces that are part of an if_b
net: disallow MTU changes on bridge member interfaces
if_bridge member interfaces should always have the same MTU as the bridge itself, so disallow MTU changes on interfaces that are part of an if_bridge.
Reviewed by: donner Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31304
show more ...
|
#
4fb3e0bb |
| 23-Jun-2021 |
Rozhuk Ivan <rozhuk.im@gmail.com> |
devctl: add RENAME devctl event for IFNET
Add devd event on network iface rename.
Reviewed by: imp@,asomers@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30839
|
#
ad22ba2b |
| 12-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
if: Remove unnecessary validation in the SIOCSIFNAME handler
A successful copyinstr() call guarantees that the returned string is nul-terminated. Furthermore, the removed check would harmlessly com
if: Remove unnecessary validation in the SIOCSIFNAME handler
A successful copyinstr() call guarantees that the returned string is nul-terminated. Furthermore, the removed check would harmlessly compare an uninitialized byte with '\0' if the new name is shorter than IFNAMESIZ - 1.
Reported by: KMSAN MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
ed93deba |
| 11-May-2021 |
John Baldwin <jhb@FreeBSD.org> |
Remove a write-only variable.
While refactoring an earlier series of changes during review, the 'saved_data' variable stopped being used at the bottom of if_ioctl().
Suggested by: brooks Reviewed b
Remove a write-only variable.
While refactoring an earlier series of changes during review, the 'saved_data' variable stopped being used at the bottom of if_ioctl().
Suggested by: brooks Reviewed by: brooks, imp, kib Fixes: d17e0940f79f Rework compat shims in ifioctl(). Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D30197
show more ...
|
#
9c87db4b |
| 05-May-2021 |
John Baldwin <jhb@FreeBSD.org> |
Group all compat shim structures together to consolidate #ifdef's.
Reviewed by: brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29894
|
#
01e9cbc4 |
| 05-May-2021 |
John Baldwin <jhb@FreeBSD.org> |
Use thunks for compat ioctls using struct ifgroupreq.
Reviewed by: brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29893
|
#
d61d98f4 |
| 05-May-2021 |
John Baldwin <jhb@FreeBSD.org> |
Add freebsd32 compat shims for SIOC[GS]DRVSPEC.
Reviewed by: brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29892
|
#
d17e0940 |
| 05-May-2021 |
John Baldwin <jhb@FreeBSD.org> |
Rework compat shims in ifioctl().
Centralize logic for handling compat ioctls into two blocks of code at the start and end of the ioctl routine. This avoids the conversion logic being spread out bo
Rework compat shims in ifioctl().
Centralize logic for handling compat ioctls into two blocks of code at the start and end of the ioctl routine. This avoids the conversion logic being spread out both in multiple blocks in ifioctl as well as various helper functions.
Reviewed by: brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29891
show more ...
|
#
8e8f1cc9 |
| 23-Apr-2021 |
Mark Johnston <markj@FreeBSD.org> |
Re-enable network ioctls in capability mode
This reverts a portion of 274579831b61 ("capsicum: Limit socket operations in capability mode") as at least rtsol and dhcpcd rely on being able to configu
Re-enable network ioctls in capability mode
This reverts a portion of 274579831b61 ("capsicum: Limit socket operations in capability mode") as at least rtsol and dhcpcd rely on being able to configure network interfaces while in capability mode.
Reported by: bapt, Greg V Sponsored by: The FreeBSD Foundation
show more ...
|
#
27457983 |
| 07-Apr-2021 |
Mark Johnston <markj@FreeBSD.org> |
capsicum: Limit socket operations in capability mode
Capsicum did not prevent certain privileged networking operations, specifically creation of raw sockets and network configuration ioctls. However
capsicum: Limit socket operations in capability mode
Capsicum did not prevent certain privileged networking operations, specifically creation of raw sockets and network configuration ioctls. However, these facilities can be used to circumvent some of the restrictions that capability mode is supposed to enforce.
Add capability mode checks to disallow network configuration ioctls and creation of sockets other than PF_LOCAL and SOCK_DGRAM/STREAM/SEQPACKET internet sockets.
Reviewed by: oshogbo Discussed with: emaste Reported by: manu Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29423
show more ...
|
#
25bfa448 |
| 21-Mar-2021 |
Adrian Chadd <adrian@FreeBSD.org> |
Add device and ifnet logging methods, similar to device_printf / if_printf
* device_printf() is effectively a printf * if_printf() is effectively a LOG_INFO
This allows subsystems to log device/net
Add device and ifnet logging methods, similar to device_printf / if_printf
* device_printf() is effectively a printf * if_printf() is effectively a LOG_INFO
This allows subsystems to log device/netif stuff using different log levels, rather than having to invent their own way to prefix unit/netif names.
Differential Revision: https://reviews.freebsd.org/D29320 Reviewed by: imp
show more ...
|
#
092f3f08 |
| 06-Mar-2021 |
Tai-hwa Liang <avatar@FreeBSD.org> |
net: fixing a memory leak in if_deregister_com_alloc()
Drain the callbacks upon if_deregister_com_alloc() such that the if_com_free[type] won't be nullified before if_destroy().
Taking fwip(4) as a
net: fixing a memory leak in if_deregister_com_alloc()
Drain the callbacks upon if_deregister_com_alloc() such that the if_com_free[type] won't be nullified before if_destroy().
Taking fwip(4) as an example, before this fix, kldunload if_fwip will go through the following:
1. fwip_detach() 2. if_free() -> schedule if_destroy() through NET_EPOCH_CALL 3. fwip_detach() returns 4. firewire_modevent(MOD_UNLOAD) -> if_deregister_com_alloc() 5. kernel complains about: Warning: memory type fw_com leaked memory on destroy (1 allocations, 64 bytes leaked). 6. EPOCH runs if_destroy() -> if_free_internal()i
By this time, if_com_free[if_alloctype] is NULL since it's already nullified by if_deregister_com_alloc(); hence, firewire_free() won't have a chance to release the allocated fw_com.
Reviewed by: hselasky, glebius MFC after: 2 weeks
show more ...
|
#
7563019b |
| 22-Feb-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Add if_try_ref() to simplify refcount handling inside epoch.
When we have an ifp pointer and the code is running inside epoch, epoch guarantees the pointer will not be freed. However, the following
Add if_try_ref() to simplify refcount handling inside epoch.
When we have an ifp pointer and the code is running inside epoch, epoch guarantees the pointer will not be freed. However, the following case can still happen:
* in thread 1 we drop to refcount=0 for ifp and schedule its deletion. * in thread 2 we use this ifp and reference it * destroy callout kicks in * unhappy user reports a bug
This can happen with the current implementation of ifnet_byindex_ref(), as we're not holding any locks preventing ifnet deletion by a parallel thread.
To address it, add if_try_ref(), allowing to return failure when referencing ifp with refcount=0. Additionally, enforce existing if_ref() is with KASSERT to provide a cleaner error in such scenarios.
Finally, fix ifnet_byindex_ref() by using if_try_ref() and returning NULL if the latter fails.
MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28836
show more ...
|
#
600eade2 |
| 16-Feb-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Add ifa_try_ref() to simplify ifa handling inside epoch.
More and more code migrates from lock-based protection to the NET_EPOCH umbrella. It requires some logic changes, including, notably, refcou
Add ifa_try_ref() to simplify ifa handling inside epoch.
More and more code migrates from lock-based protection to the NET_EPOCH umbrella. It requires some logic changes, including, notably, refcount handling.
When we have an `ifa` pointer and we're running inside epoch we're guaranteed that this pointer will not be freed. However, the following case can still happen: * in thread 1 we drop to 0 refcount for ifa and schedule its deletion. * in thread 2 we use this ifa and reference it * destroy callout kicks in * unhappy user reports bug
To address it, new `ifa_try_ref()` function is added, allowing to return failure when we try to reference `ifa` with 0 refcount. Additionally, existing `ifa_ref()` is enforced with `KASSERT` to provide cleaner error in such scenarious.
Reviewed By: rstone, donner Differential Revision: https://reviews.freebsd.org/D28639 MFC after: 1 week
show more ...
|