General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier f
General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.Special thanks to Wind River for providing access to "The Duke ofHighlander" tool: an older (2014) run over FreeBSD tree was useful as astarting point.
show more ...
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Add large replay widow support to setkey(8) and libipsec.When the replay window size is large than UINT8_MAX, add to the requestthe SADB_X_EXT_SA_REPLAY extension header that was added in r309144.
Add large replay widow support to setkey(8) and libipsec.When the replay window size is large than UINT8_MAX, add to the requestthe SADB_X_EXT_SA_REPLAY extension header that was added in r309144.Also add support of SADB_X_EXT_NAT_T_TYPE, SADB_X_EXT_NAT_T_SPORT,SADB_X_EXT_NAT_T_DPORT, SADB_X_EXT_NAT_T_OAI, SADB_X_EXT_NAT_T_OAR,SADB_X_EXT_SA_REPLAY, SADB_X_EXT_NEW_ADDRESS_SRC, SADB_X_EXT_NEW_ADDRESS_DSTextension headers to the key_debug that is used by `setkey -x`.Modify kdebug_sockaddr() to use inet_ntop() for IP addresses formatting.And modify kdebug_sadb_x_policy() to show policy scope and priority.Reviewed by: gnn, Emeric PouponMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D10375
Make setkey(8) more clear about anti-replay window size option semantics.PR: 172913Submitted by: [email protected]Reviewed by: ae@MFC after: 2 weeksDifferential Revision: https://reviews.fr
Make setkey(8) more clear about anti-replay window size option semantics.PR: 172913Submitted by: [email protected]Reviewed by: ae@MFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D10304
Use unique SPI.MFC after: 1 week
In the example section show that TCP-MD5 connection needs SA for bothdirections.Submitted by: Mike Tancsa <mike at sentex net>MFC after: 1 week
Fix CFLAGS for including netipsec headers #includesThe netipsec headers are referenced via netipsec/..., not ./... .Thus, assuming that the netipsec/... is nested under ${SRCTOP}/sys/netipsecis w
Fix CFLAGS for including netipsec headers #includesThe netipsec headers are referenced via netipsec/..., not ./... .Thus, assuming that the netipsec/... is nested under ${SRCTOP}/sys/netipsecis wrong.This tripped up some individuals building ^/head on systems pre-r314812.MFC after: 1 weekReported by: Roberto Rodriguez Jr <[email protected]>Sponsored by: Dell EMC Isilon
Delete duplicate -I <SRCTOP>/lib/libipsec added in r171135It's already handled earlier on in the Makefile, per the change madein r80029.MFC after: 1 monthSponsored by: Dell EMC Isilon
Introduce the concept of IPsec security policies scope.Currently are defined three scopes: global, ifnet, and pcb.Generic security policies that IKE daemon can add via PF_KEY interfaceor an admin
Introduce the concept of IPsec security policies scope.Currently are defined three scopes: global, ifnet, and pcb.Generic security policies that IKE daemon can add via PF_KEY interfaceor an administrator creates with setkey(8) utility have GLOBAL scope.Such policies can be applied by the kernel to outgoing packets and checkedagains inbound packets after IPsec processing.Security policies created by if_ipsec(4) interfaces have IFNET scope.Such policies are applied to packets that are passed through if_ipsec(4)interface.And security policies created by application using setsockopt()IP_IPSEC_POLICY option have PCB scope. Such policies are applied topackets related to specific socket. Currently there is no way to listPCB policies via setkey(8) utility.Modify setkey(8) and libipsec(3) to be able distinguish the scope ofsecurity policies in the `setkey -DP` listing. Add two optional flags:'-t' to list only policies related to virtual *tunneling* interfaces,i.e. policies with IFNET scope, and '-g' to list only policies with GLOBALscope. By default policies from all scopes are listed.To implement this PF_KEY's sadb_x_policy structure was modified.sadb_x_policy_reserved field is used to pass the policy scope from thekernel to userland. SADB_SPDDUMP message extended to support filteringby scope: sadb_msg_satype field is used to specify bit mask of requestedscopes.For IFNET policies the sadb_x_policy_priority field of struct sadb_x_policyis used to pass if_ipsec's interface if_index to the userland. For GLOBALpolicies sadb_x_policy_priority is used only to manage order of securitypolicies in the SPDB. For IFNET policies it is not used, so it can be usedto keep if_index.After this change the output of `setkey -DP` now looks like:# setkey -DPt0.0.0.0/0[any] 0.0.0.0/0[any] any in ipsec esp/tunnel/87.250.242.144-87.250.242.145/unique:145 spid=7 seq=3 pid=58025 scope=ifnet ifname=ipsec0 refcnt=1# setkey -DPg::/0 ::/0 icmp6 135,0 out none spid=5 seq=1 pid=872 scope=global refcnt=1No objection from: #networkObtained from: Yandex LLCMFC after: 2 weeksSponsored by: Yandex LLCDifferential Revision: https://reviews.freebsd.org/D9805
sbin: normalize paths using SRCTOP-relative paths or :H when possibleThis simplifies make logic/outputMFC after: 1 monthSponsored by: Dell EMC Isilon
Document that the size of AH ICV for HMAC-SHA2-NNN should be half ofNNN bits as described in RFC4868.PR: 215978
Merge projects/ipsec into head/. Small summary -------------o Almost all IPsec releated code was moved into sys/netipsec.o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel option
Merge projects/ipsec into head/. Small summary -------------o Almost all IPsec releated code was moved into sys/netipsec.o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel option IPSEC_SUPPORT added. It enables support for loading and unloading of ipsec.ko and tcpmd5.ko kernel modules.o IPSEC_NAT_T option was removed. Now NAT-T support is enabled by default. The UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type support was removed. Added TCP/UDP checksum handling for inbound packets that were decapsulated by transport mode SAs. setkey(8) modified to show run-time NAT-T configuration of SA.o New network pseudo interface if_ipsec(4) added. For now it is build as part of ipsec.ko module (or with IPSEC kernel). It implements IPsec virtual tunnels to create route-based VPNs.o The network stack now invokes IPsec functions using special methods. The only one header file <netipsec/ipsec_support.h> should be included to declare all the needed things to work with IPsec.o All IPsec protocols handlers (ESP/AH/IPCOMP protosw) were removed. Now these protocols are handled directly via IPsec methods.o TCP_SIGNATURE support was reworked to be more close to RFC.o PF_KEY SADB was reworked: - now all security associations stored in the single SPI namespace, and all SAs MUST have unique SPI. - several hash tables added to speed up lookups in SADB. - SADB now uses rmlock to protect access, and concurrent threads can do SA lookups in the same time. - many PF_KEY message handlers were reworked to reflect changes in SADB. - SADB_UPDATE message was extended to support new PF_KEY headers: SADB_X_EXT_NEW_ADDRESS_SRC and SADB_X_EXT_NEW_ADDRESS_DST. They can be used by IKE daemon to change SA addresses.o ipsecrequest and secpolicy structures were cardinally changed to avoid locking protection for ipsecrequest. Now we support only limited number (4) of bundled SAs, but they are supported for both INET and INET6.o INPCB security policy cache was introduced. Each PCB now caches used security policies to avoid SP lookup for each packet.o For inbound security policies added the mode, when the kernel does check for full history of applied IPsec transforms.o References counting rules for security policies and security associations were changed. The proper SA locking added into xform code.o xform code was also changed. Now it is possible to unregister xforms. tdb_xxx structures were changed and renamed to reflect changes in SADB/SPDB, and changed rules for locking and refcounting.Reviewed by: gnn, wblockObtained from: Yandex LLCRelnotes: yesSponsored by: Yandex LLCDifferential Revision: https://reviews.freebsd.org/D9352
setkey appeared in FreeBSD 4.0PR: 212551Approved by: bcr (mentor)MFC after: 4 daysDifferential Revision: https://reviews.freebsd.org/D8105
Use nitems() from sys/param.h.MFC after: 2 weeks.
DIRDEPS_BUILD: Regenerate without local dependencies.These are no longer needed after the recent 'beforebuild: depend' changesand hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
DIRDEPS_BUILD: Regenerate without local dependencies.These are no longer needed after the recent 'beforebuild: depend' changesand hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supportsskipping 'make depend'.Sponsored by: EMC / Isilon Storage Division
Explicitly add more files to the 'runtime' package.Sponsored by: The FreeBSD Foundation
Add support for keys that include 4 byte SALT values,including GCM and ICM/CTR modes for AES.Reviewed by: jmgMFC after: 1 weekSponsored by: Rubicon Communications (Netgate)
Summary: Remove unsupported 3des-deriv encryption algorithm from documentation.
Update the date on the manual page.Noticed by: bz
New AES modes for IPSec, user space components.Update setkey and libipsec to understand aes-gcm-16 as anencryption method.A partial commit of the work in review D2936.Submitted by: eriReviewed
New AES modes for IPSec, user space components.Update setkey and libipsec to understand aes-gcm-16 as anencryption method.A partial commit of the work in review D2936.Submitted by: eriReviewed by: jmgMFC after: 2 weeksSponsored by: Rubicon Communications (Netgate)
Fix support for the null encryption algorithm which now requiresa key.Sponsored by: Rubicon Communications (Netgate)
Fix typo when deregistering the VLAN unconfig event handlerSubmitted by: Masao Uebayashi <[email protected]>MFC after: 3 days
dirdeps.mk now sets DEP_RELDIR
Fix a lock up where we enter swapper() with interrupts disabled.In smp_rendezvous_cpus we expect to wait for all cpus to entersmp_rendezvous_action. If we call this holding a proc lock swapper may
Fix a lock up where we enter swapper() with interrupts disabled.In smp_rendezvous_cpus we expect to wait for all cpus to entersmp_rendezvous_action. If we call this holding a proc lock swapper mayattempt to also lock it, however as interrupts are disabled the cpu neverhandles the ipi. Because smp_rendezvous_action waits for all signaledcpus before contining it may get caught waiting for the cpu running swapperas the proc mutex will be unlocked after smp_rendezvous_cpus finishes.The fix is to enable interrupts in the configure stage as we should bedoing.MFC after: 1 week
Export some new busdma stats via sysctl for armv6. Added: hw.busdma.tags_total: 46 hw.busdma.maps_total: 1302 hw.busdma.maps_dmamem: 851 hw.busdma.maps_coherent: 849 hw.busdma.maploads_total:
Export some new busdma stats via sysctl for armv6. Added: hw.busdma.tags_total: 46 hw.busdma.maps_total: 1302 hw.busdma.maps_dmamem: 851 hw.busdma.maps_coherent: 849 hw.busdma.maploads_total: 1568812 hw.busdma.maploads_bounced: 16750 hw.busdma.maploads_coherent: 920 hw.busdma.maploads_dmamem: 920 hw.busdma.maploads_mbuf: 1542766 hw.busdma.maploads_physmem: 0
1234