FreeBSD/src 948078bsys/netpfil/pf pf_norm.c

pf: fix !VIMAGE build
DeltaFile
+0-2sys/netpfil/pf/pf_norm.c
+0-21 files

FreeBSD/src 6e60affsys/netpfil/pf pf.c

pf: fix NOINET6 build
DeltaFile
+2-0sys/netpfil/pf/pf.c
+2-01 files

FreeBSD/src 4078e0dbin/timeout/tests timeout_test.sh

timeout(1) tests: atf_fail requires a reason

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+1-1bin/timeout/tests/timeout_test.sh
+1-11 files

FreeBSD/src 81ef001bin/timeout timeout.c

timeout(1): pass full 32bit error return code from the exited child

Switch to use waitid(2) to receive siginfo_t with the complete error
code from the exited process.

Tested by:      pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+37-21bin/timeout/timeout.c
+37-211 files

FreeBSD/src aa8cdb7bin/timeout timeout.c

timeout(1): only start the child command after the parent is fully set up

Since the default disposition for SIGCHLD is ignore, the prematurely
exited child would cause SIGCHLD dropped.  This makes timeout(1) hang,
because REAP_STATUS reports a zombie not waited for, but SIGCHLD for it
was already lost, so the main loop cannot exit, instead calling into
sigsuspend().

Reported and tested by: pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+16-1bin/timeout/timeout.c
+16-11 files

FreeBSD/src bff05e8bin/timeout timeout.c

timeout(1): print errno when signalling syscalls failed

Tested by:      pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+8-6bin/timeout/timeout.c
+8-61 files

FreeBSD/src 15e4b8dbin/timeout timeout.c

timeout(1): silence warnings for ESRCH

It is possible for the child to become zombie and then there is nothing
to signal.

Reported and tested by: pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+10-3bin/timeout/timeout.c
+10-31 files

FreeBSD/src 8dda34dsys/kern kern_sig.c

exit1(): Ensure that SIGCHLD from reparented child is queued to reaper

We have a reaper R and child A with grandchild B. Now, suppose that B
already have exited, and that A did not waited on B. When A is exiting,
its child B is reparented to R, but its p_ksi was already queued for A.
This means that SIGCHLD is not queued to R, it is only marked as pending
in bitmap.

If other SIGCHLD is queued, we would miss a delivery of the notification
for B exiting.  Additionally, R does not see siginfo for B.

Do not even try to send SIGCHLD if the target is zombie.  Only update
the ksi state for possible consumption by the reaper.

Tested by:      pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+8-1sys/kern/kern_sig.c
+8-11 files

FreeBSD/src 2be717bsys/kern kern_sig.c

kern_sigsuspend: rename wchan

The existing name "pause" is not most intuitive to guess where the
process sleep.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+1-1sys/kern/kern_sig.c
+1-11 files

FreeBSD/src 8226a8bsys/kern kern_sig.c

kern_sigsuspend(): style

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50752
DeltaFile
+2-2sys/kern/kern_sig.c
+2-21 files

FreeBSD/src e17485csys/netinet in_prot.c in_systm.h, sys/sys priv.h

inpcb: provide policy cr_canexport_ktlskeys() and the privilege PRIV_NETINET_KTLSKEYS

The policy defines the visibility of the ktls session keys to a thread.

Reviewed by:    markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+14-0sys/netinet/in_prot.c
+2-0sys/netinet/in_systm.h
+1-0sys/sys/priv.h
+17-03 files

FreeBSD/src 4b17a91sys/netinet in_prot.c

netinet/in_prot.c: normalize includes

Remove sys/cdefs.h.
Remote opt_inet*.h, they are not used.
Order alphabetically.
Update the herald comment.

Reviewed by:    markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+2-7sys/netinet/in_prot.c
+2-71 files

FreeBSD/src 5fea0d9sys/netinet tcp_subr.c tcp_var.h

sysctl net.inet.tcp.ktlslist

Reviewed by:    jhb (previous version), markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+212-0sys/netinet/tcp_subr.c
+3-0sys/netinet/tcp_var.h
+215-02 files

FreeBSD/src 27f680bsys/net if_var.h

send tags: add a status report method

Reviewed by:    jhb, markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+2-0sys/net/if_var.h
+2-01 files

FreeBSD/src b471d23sys/kern uipc_ktls.c, sys/sys ktls.h

ktls: add global generation count

Reviewed by:    jhb, markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+9-0sys/sys/ktls.h
+8-0sys/kern/uipc_ktls.c
+17-02 files

FreeBSD/src 0d5b6fbsys/kern kern_prot.c, sys/sys ucred.h

kern_prot: extract code to check that active ids are superset of obj ids

Export it as a helper cr_xids_subset().

Reviewed by:    markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+39-25sys/kern/kern_prot.c
+1-0sys/sys/ucred.h
+40-252 files

FreeBSD/src c9e9a0fsys/kern uipc_ktls.c, sys/netinet in_pcb.h

ktls: define struct xktls_session and converter from ktls_session into external representation

Reviewed by:    jhb (previous version), markj
Sponsored by:   NVidia networking
Differential revision:  https://reviews.freebsd.org/D50653
DeltaFile
+53-0sys/kern/uipc_ktls.c
+27-0sys/sys/ktls.h
+24-0sys/netinet/in_pcb.h
+104-03 files

FreeBSD/src 2ab7cbdsys/compat/linuxkpi/common/include/linux ieee80211.h, sys/compat/linuxkpi/common/include/net cfg80211.h

net80211: LinuxKPI: migrate HE defines to net80211, put correct values

Migrate most LinuxKPI 802.11 definitions for HE IEs to net80211.
During that process also properly define them as most of them only
had dummy values.  Some of the definitions are sparse;  that is, only
the bits used by drivers so far were listed and annotated with the
standards section.

There seems to be little point to mangle the names and have two copies
of all these bit field definitions.  We can add "_S" (shift/mask)
variants to those we need in net80211 (if we do).

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D50677
DeltaFile
+207-2sys/net80211/ieee80211.h
+2-170sys/compat/linuxkpi/common/include/net/cfg80211.h
+0-4sys/compat/linuxkpi/common/include/linux/ieee80211.h
+209-1763 files

FreeBSD/src a2a1573sbin/ifconfig ifieee80211.c

ifconfig: 802.11: decode more information elements (IEs)

Start dealing with Element ID Extension present (IE T=255) and start
parsing elemants from the Element ID Extension set.

Namely (partially) decode HE_CAPA, HE_OPER, MU_EDCA_PARAM_SET,
and as well as SUP_OP_CLASS.

For length reasons also rename UNKNOWN_ELEMID_%d to ELEMID_%d.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D50678
DeltaFile
+226-3sbin/ifconfig/ifieee80211.c
+226-31 files

FreeBSD/src 8be200csys/compat/linuxkpi/common/include/net cfg80211.h mac80211.h, sys/net80211 ieee80211.h

net80211: LinuxKPI: migrate HE IE structs from LinuxKPI to net80211

Take the HE IE structures as they are used by drivers and put them
into net80211 rather than LinuxKPI.  There is little need to
re-invent the wheel on those.  They settled for long enough.

Do not export them by default to user space as some also overlap with
wpa and we still do not have a clear distinction for what is available
only in kernel and what to user space.   In our case ifconfig(8)
is a consumer of these structs which it can setting WANT_NET80211 like
we have done for some VHT bits before.

Add struct net80211_he_cap which holds the IE fields but also a bool
and is meant to be put into ic/vap/ni.  The bool will give us the same
naming for all layers rather than having individual flags in each part
which was highly confusing.  In theory this struct should be in
ieee80211_var.h but that would pull things apart.

Extend struct ieee80211_mu_edca_param_set by a union as it will help

    [6 lines not shown]
DeltaFile
+70-0sys/net80211/ieee80211.h
+1-23sys/compat/linuxkpi/common/include/net/cfg80211.h
+0-5sys/compat/linuxkpi/common/include/net/mac80211.h
+71-283 files

FreeBSD/src 1313f1csbin/ifconfig ifieee80211.c

ifconfig: 802.11: decode RSNXE IE

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D50675
DeltaFile
+31-0sbin/ifconfig/ifieee80211.c
+31-01 files

FreeBSD/src e277735sbin/ifconfig ifieee80211.c

ifconfig: 802.11: print node unicast key (PTK) if available in STA mode

Add a variable when querying the BSSID so we can later use it rather
than losing the "data" buffer.

When printing key information also query the node unicast key if in
STA mode (the key for the BSSID).  Do not error in case we fail.
This is helpful for debugging mostly; was also useful when testing
GCMP support.

Sponsored by:   The FreeBSD Foundation
MFC after;      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D50554
DeltaFile
+20-4sbin/ifconfig/ifieee80211.c
+20-41 files

FreeBSD/src 164bf9fsbin/ifconfig ifieee80211.c

ifconfig: 802.11: factor out keyix printing

The node unicast key (PTK) uses a key index of (-1) and printing
a 64k number does not look great.  Factor out printing the key
number into a buffer and use 'ucast' for the node unicast key.
Hope is that this will be useful for the future as well when we
will have more/different keys possibly.

Looks like (with -vk):
        AES-CCM 2:128-bit <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> rsc 0 tsc 0 rx
        AES-CCM 3:128-bit <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> rsc 0 tsc 0 rx
        AES-GCM ucast:128-bit <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> rsc 0 tsc 0 tx+rx

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D50555
DeltaFile
+22-9sbin/ifconfig/ifieee80211.c
+22-91 files

FreeBSD/src 54ad06csbin/ifconfig ifieee80211.c

ifconfig: 802.11: also print IEEE80211_CIPHER_AES_GCM_128 information

While we currently do not print the STA unicast key (PTK) we will not
see this but it is for fullness and in preparations for follow-up
hanges.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D50553
DeltaFile
+6-0sbin/ifconfig/ifieee80211.c
+6-01 files

FreeBSD/src f96f838tests/sys/netpfil/pf frag6.py

pf tests: frag6.py:TestFrag6_RouteTo::test_too_big requires scapy

Mark it as such so we skip rather than fail if scapy is not installed.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-0tests/sys/netpfil/pf/frag6.py
+2-01 files

FreeBSD/src ecc175etests/sys/netpfil/pf killstate.sh

pf tests: killstate:key requires scapy

Mark it as such so we skip rather than fail if scapy is not installed.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-0tests/sys/netpfil/pf/killstate.sh
+1-01 files

FreeBSD/src 54a547fsys/net pfvar.h, sys/netpfil/pf pf_ruleset.c pf.h

pf: split pf_find_or_create_ruleset() into smaller chunks

tested by Hrvoje
OK mpi@, OK bluhm@

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, 0d5abfc5ba
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D50725
DeltaFile
+114-64sys/netpfil/pf/pf_ruleset.c
+2-0sys/net/pfvar.h
+1-0sys/netpfil/pf/pf.h
+117-643 files

FreeBSD/src 4ace4easbin/pfctl pfctl_parser.h parse.y

pfctl: add option -S (no domain resolution)

manpage wording and reminder about usage() jmc@
ok florian@ henning@

Reviewed by:    ziaee (manpages)
Obtained from:  OpenBSD, benno <benno at openbsd.org>, 7c8726d43b
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D50724
DeltaFile
+19-18sbin/pfctl/pfctl_parser.h
+10-9sbin/pfctl/parse.y
+9-9sbin/pfctl/pfctl_table.c
+9-6sbin/pfctl/pfctl_parser.c
+5-2sbin/pfctl/pfctl.c
+4-1sbin/pfctl/pfctl.8
+56-452 files not shown
+59-488 files

FreeBSD/src defc181sys/netpfil/pf pf_norm.c

pf: reorganise fragment reassembly

To avoid packet loss due to reuse of the 16 bit IPv4 fragment id,
we need suitable data structures.  Organize the pf fragments with
two red-black trees.  One is holding the address and protocol
information and the other has only the fragment id.  This will allow
to drop fragemts for specific connections more aggressively.
from markus@; OK sashan@

Obtained from:  OpenBSD, bluhm <bluhm at openbsd.org>, 09228e5ff0
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D50723
DeltaFile
+116-57sys/netpfil/pf/pf_norm.c
+116-571 files

FreeBSD/src 67d1ea0sys/netpfil/pf pf_ioctl.c pf_nl.c

pf: use time_uptime rather than time_seconds

Use time_uptime as value for when pf was enabled instead of time_second.  Since
time_second changes depending on the wall- clock time, time_second is not a
reliable source for the status. We can even end up with a negative time delta.
Thus, use the monotonically growing time_uptime and compute the correct wall
clock time when userspace requests the status.

ok bluhm@ mikeb@

Reviewed by:    imp
Obtained from:  OpenBSD, patrick <patrick at openbsd.org>, 63b24bda99
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D50722
DeltaFile
+8-4sys/netpfil/pf/pf_ioctl.c
+4-1sys/netpfil/pf/pf_nl.c
+12-52 files