2062 Commits

Author SHA1 Message Date
Sebastian Huber
2f7103677c Define IN_HISTORICAL_NETS for kernel space
Required by FreeBSD commit:

Author: Mike Karels <karels@FreeBSD.org>
Date:   Tue Oct 26 22:01:09 2021 -0500

    kernel: deprecate Internet Class A/B/C

    Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is defined;
    define it for user level.  Define IN_MULTICAST separately from IN_CLASSD,
    and use it in pf instead of IN_CLASSD.  Stop using class for setting
    default masks when not specified; instead, define new default mask
    (24 bits).  Warn when an Internet address is set without a mask.

    MFC after:      1 month
    Reviewed by:    cy
    Differential Revision: https://reviews.freebsd.org/D32708
2022-07-07 14:23:25 +02:00
Konstantin Belousov
7974c8b9db Kernel-side infrastructure to implement nvlist-based set/get ifcaps
Reviewed by:	hselasky, jhb, kp (previous version)
Sponsored by:	NVIDIA Networking
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D32551
2022-07-07 14:23:25 +02:00
Rick Macklem
e86ac20e9f uipc_socket.c: Modify MSG_TLSAPPDATA to only do Alert Records
Without this patch, the MSG_TLSAPPDATA flag would cause
soreceive_generic() to return ENXIO for any non-application
data record in a TLS receive stream.

This works ok for TLS1.2, since Alert records appear to be
the only non-application data records received.
However, for TLS1.3, there can be post-handshake handshake
records, such as NewSessionKey sent to the client from the
server. These handshake records cannot be handled by the
upcall which does an SSL_read() with length == 0.

It appears that the client can simply throw away these
NewSessionKey records, but to do so, it needs to receive
them within the kernel.

This patch modifies the semantics of MSG_TLSAPPDATA slightly,
so that it only applies to Alert records and not Handshake
records. It is needed to allow the krpc to work with KTLS1.3.

Reviewed by:	hselasky
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35170
2022-07-07 14:23:25 +02:00
Kristof Provost
d9027851bd Widen ifnet_detach_sxlock coverage
Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code.
This ensures that we can't end up having the vnet_sysuninit free the UDP
pcb while the detach code is running and trying to purge the UDP pcb.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28530
2022-07-07 14:23:25 +02:00
Rick Macklem
4de7ab7e97 Add the MSG_TLSAPPDATA flag to indicate "return ENXIO" for non-application TLS data records.
The kernel RPC cannot process non-application data records when
using TLS. It must to an upcall to a userspace daemon that will
call SSL_read() to process them.

This patch adds a new flag called MSG_TLSAPPDATA that the kernel
RPC can use to tell sorecieve() to return ENXIO instead of a non-application
data record, when that is what is at the top of the receive queue.
I put the code in #ifdef KERN_TLS/#endif, although it will build without
that, so that it is recognized as only useful when KERN_TLS is enabled.
The alternative to doing this is to have the kernel RPC re-queue the
non-application data message after receiving it, but that seems more
complicated and might introduce message ordering issues when there
are multiple non-application data records one after another.

I do not know what, if any, changes will be required to support TLS1.3.

Reviewed by:	glebius
Differential Revision:	https://reviews.freebsd.org/D25923
2022-07-07 14:23:25 +02:00
Sebastian Huber
52ec6ffbc2 CONTRIBUTING.rst: Add FreeBSD baseline update hints 2022-07-07 14:23:25 +02:00
Sebastian Huber
f009252227 user-space: Request FreeBSD bitset API
This is required for recent Newlib versions.

Update #4667.
2022-06-30 17:41:02 +02:00
Sebastian Huber
d94d6157b4 build: Ensure mandatory compiler/linker flags
Make sure the flags are present in all build configurations.
2022-06-23 11:12:40 +02:00
Sebastian Huber
3c2de34cc6 README.rst: Remove RTEMS_POSIX_API from BSP config 2022-06-22 17:33:38 +02:00
Sebastian Huber
d17efd345d build: Do not require RTEMS_POSIX_API 2022-06-22 17:27:11 +02:00
Sebastian Huber
0cd30949fc netstat: Do not use signals 2022-06-22 17:27:11 +02:00
Sebastian Huber
e583f152b4 wlanstats: Do not use signals 2022-06-22 17:27:11 +02:00
Sebastian Huber
217c2e2a8b ping6: Do not use signals 2022-06-22 17:27:09 +02:00
Sebastian Huber
4ca39ca3fc ping: Do not use signals 2022-06-22 17:25:58 +02:00
Sebastian Huber
cdb5ac55c6 openssl: Do not use signals 2022-06-22 17:25:58 +02:00
Sebastian Huber
93519fa764 wpa: Use CONFIG_ELOOP_KQUEUE
This avoids issues with the fd_set size.
2022-06-22 17:25:58 +02:00
Sebastian Huber
dd3f119d3b wpa: Do not use signals 2022-06-22 17:25:58 +02:00
Sebastian Huber
691575801c ipsec-tools: Do not use signals 2022-06-22 17:25:57 +02:00
Sebastian Huber
8952450d88 racoon: Do not rely on <sys/types.h> 2022-06-22 17:25:57 +02:00
Sebastian Huber
9ef5c9a2ff CONTRIBUTING.rst: Warn about white space changes 2022-06-09 08:39:24 +02:00
Christian Mauderer
f5e9bae508 if_ffec: Allow PHY that is connected to other FFEC
The i.MX6UL (and some others from the i.MX family) have shared MDIO
lines for multiple FFECs. This patch allows to use the MDIO interface
from another Ethernet controller.

Note that you have to make sure that the FFECs are initialized in the
right order. Normally that can be done via FDT.
2022-06-07 09:07:15 +02:00
Christian Mauderer
91afe3a020 if_ffec: Reduce buffer size
Typical embedded systems don't have that much memory. Reduce the buffer
size to something more sensible for the usual type of application.
2022-06-07 09:07:08 +02:00
Karel Gardas
508af74f79 if_stmac: fix compilation error (related to crc32_raw move in FreeBSD)
FreeBSD in 2019 moved crc32 function into separate gsb_crc32.h header
file and probably after libbsd sync with this change if_stmac got broken.
2022-06-04 19:54:09 +02:00
Sebastian Huber
d1bfa784b7 Use rtems_task_exit() 2022-06-01 10:36:17 +02:00
Sebastian Huber
9e87868ec2 if_atsam: Recover from receive freezes
Under unknown conditions the receive path ended up in a frozen state.
In this state, the DMA and driver descriptor head were equal and all
receive descriptors had the used bit set.  So, the DMA was unable to
store received frames.  However, the receive daemon was never woken up
to refill the receive buffers.  It seems that the RXUBR interrupt can be
used to recover from this state.

Update #4652.
2022-06-01 09:59:10 +02:00
Sebastian Huber
eea3f0eec3 if_atsam: Shorten sysctl names
Update #4652.
2022-06-01 09:59:10 +02:00
Sebastian Huber
1ed12b8af7 if_atsam: Add tx/rx desc sysctls
Update #4652.
2022-06-01 09:59:10 +02:00
Sebastian Huber
eb58e82197 if_atsam: Add register sysctls
Update #4652.
2022-06-01 09:59:10 +02:00
Sebastian Huber
5650e92685 if_atsam: Allow stats reset via sysctl
Update #4652.
2022-06-01 09:59:09 +02:00
Sebastian Huber
fdb00bbb3d libbsd.txt: Move issues and TODO 2022-05-23 16:28:26 +02:00
Sebastian Huber
3eabdce585 libbsd.txt: Move system control hints
Generalize hint.
2022-05-23 16:26:30 +02:00
Sebastian Huber
96c01bff09 libbsd.txt: Move initialization details 2022-05-23 16:26:30 +02:00
Sebastian Huber
3d36dc0239 libbsd.txt: Move IPsec description 2022-05-23 16:26:30 +02:00
Sebastian Huber
47281722c4 libbsd.txt: Move WLAN description 2022-05-23 16:26:30 +02:00
Sebastian Huber
56fe2fd56e libbsd.txt: Move PF description 2022-05-23 16:26:30 +02:00
Sebastian Huber
c80453238b libbsd.txt: Remove NIC status
Details like this should be described in the BSP documentation of the
User Manual.
2022-05-23 16:26:30 +02:00
Sebastian Huber
099b7eb535 libbsd.txt: Move ported kernel features
Remove obsolete file listing.
2022-05-23 16:26:30 +02:00
Sebastian Huber
06ee26024e libbsd.txt: Move Qemu notes 2022-05-23 16:26:30 +02:00
Sebastian Huber
a3172c7f26 libbsd.txt: Move network interface driver hints 2022-05-23 16:26:30 +02:00
Sebastian Huber
e56945817f libbsd.txt: Move features
Add more features and commands.
2022-05-23 16:26:30 +02:00
Sebastian Huber
310f6fb70d libbsd.txt: Move initialization description 2022-05-23 16:26:30 +02:00
Sebastian Huber
92219bc66e libbsd.txt: Move configuration of network tests 2022-05-23 16:26:30 +02:00
Sebastian Huber
8d74437b78 libbsd.txt: Move buildsets description 2022-05-23 16:26:30 +02:00
Sebastian Huber
384600c11f libbsd.txt: Remove installation overview
This is already covered by README.md
2022-05-23 16:26:30 +02:00
Sebastian Huber
dcdf571c45 libbsd.txt: Move BSP related content 2022-05-23 16:26:30 +02:00
Sebastian Huber
5c4cf1f708 libbsd.txt: Move introduction content 2022-05-23 16:26:30 +02:00
Sebastian Huber
5edfd30fe9 CONTRIBUTING.rst: Use LibBSD 2022-05-23 16:26:30 +02:00
Sebastian Huber
30e2b2867c Convert *.md files to reST
The reST format is used by the standard RTEMS documentation.
2022-05-23 16:26:30 +02:00
Sebastian Huber
765a0b73c0 README.md: Move SMP Requirements section 2022-05-23 16:26:30 +02:00
Sebastian Huber
95fde102a8 README.md: Update to RTEMS 6 2022-05-23 16:26:30 +02:00