<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests/sys, branch release/13.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-03-06T19:37:56Z</updated>
<entry>
<title>netlink: fix interface dump.</title>
<updated>2023-03-06T19:37:56Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-02-16T13:17:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4639f11c9fb74258d811b0c9aea4053ffc74f4c0'/>
<id>urn:sha1:4639f11c9fb74258d811b0c9aea4053ffc74f4c0</id>
<content type='text'>
The current code missed interface addition when reallocating
 temporary buffer.
Tweak the code to perform the reallocation first and add
 interface afterwards unconditionally.

Reported by:	Marek Zarychta &lt;zarychtam@plan-b.pwste.edu.pl&gt;
Approved by:	re (cperciva)

(cherry picked from commit 86fd0bdba540132ae298457e160b651f61d1db6b)
(cherry picked from commit a800622765b1e7cab79fa857e9a671e6c0c1ccec)
</content>
</entry>
<entry>
<title>sockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().</title>
<updated>2023-02-09T18:01:49Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2022-07-25T19:46:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=adaf752192c165b66875e81db62d274a09591d0c'/>
<id>urn:sha1:adaf752192c165b66875e81db62d274a09591d0c</id>
<content type='text'>
Implement Linux-variant of MSG_TRUNC input flag used in recv(), recvfrom() and recvmsg().
Posix defines MSG_TRUNC as an output flag, indicating packet/datagram truncation.
Linux extended it a while (~15+ years) ago to act as input flag,
resulting in returning the full packet size regarless of the input
buffer size.
It's a (relatively) popular pattern to do recvmsg( MSG_PEEK | MSG_TRUNC) to get the
packet size, allocate the buffer and issue another call to fetch the packet.
In particular, it's popular in userland netlink code, which is the primary driving factor of this change.

This commit implements the MSG_TRUNC support for SOCK_DGRAM sockets (udp, unix and all soreceive_generic() users).

PR:		kern/176322
Reviewed by:	pauamma(doc)
Differential Revision: https://reviews.freebsd.org/D35909
MFC after:	1 month

(cherry picked from commit be1f485d7d6bebc53b055cc165a11ada0ab5fb17)
</content>
</entry>
<entry>
<title>sched.h: Fix _S macros for better compatibility with glibc.</title>
<updated>2023-02-06T19:06:30Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2023-01-29T12:34:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=669dc70e40ff68e6d58df84ce21c175fe6c6321f'/>
<id>urn:sha1:669dc70e40ff68e6d58df84ce21c175fe6c6321f</id>
<content type='text'>
In e2650af157 was added "_S" macros for compatibility with glibc, but it's still
incompatible as under glibc the macros whose names end with "_S" operate on the
dynamically allocated CPU set(s) whose size is in bytes, not in bits.

While here remove limiting ifdef to non-kernel case.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D38110
MFC after:		1 week

(cherry picked from commit 02f7670ed243498aea96150962c2c9916bab7c98)
</content>
</entry>
<entry>
<title>netpfil tests: improve pfsync_defer.py</title>
<updated>2023-01-29T05:37:46Z</updated>
<author>
<name>Kajetan Staszkiewicz</name>
<email>vegeta@tuxpowered.net</email>
</author>
<published>2023-01-20T09:43:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3c37c1ea19892d672325657905ffb4c27dd81472'/>
<id>urn:sha1:3c37c1ea19892d672325657905ffb4c27dd81472</id>
<content type='text'>
Return different exit code depending on which failure was encountered.
The pfsync test expect a very particular failure, not just any.

MFC after:	1 week
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D38123

(cherry picked from commit 06012728beff45e94d58410eae7cda2ea980ef77)
</content>
</entry>
<entry>
<title>netpfil tests: improve pft_ping.py</title>
<updated>2023-01-29T05:37:46Z</updated>
<author>
<name>Kajetan Staszkiewicz</name>
<email>vegeta@tuxpowered.net</email>
</author>
<published>2023-01-21T02:44:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4c3c6c9271c0d28da5e0d6832c06aa74c530f456'/>
<id>urn:sha1:4c3c6c9271c0d28da5e0d6832c06aa74c530f456</id>
<content type='text'>
Multiple improvements to pft_ping.py:

* Automatically use IPv6 when IPv6 addresses are used, --ip6 is not needed.
* Building of ping requests and parsing of ping replies is done layer by
  layer. This way most arguments are available both for IPv6 and IPv4,
  for ICMP and TCP.
* Use argument groups for improved readability.
* Change ToS and TTL argument name to TC and HL to reflect the modern
  IPv6 nomenclature. The argument still set related IPv4 header fields
  properly.
* Instead of sniffing for the very specific case of duplicated packets,
  allow for sniffing on multiple interfaces.
* Report which sniffer has failed by setting bits of error code.
* Raise meaningful exceptions when irrecoverable errors happen.
* Make IPv4 fragmentation flags configurable.
* Make IPv6 HL / IPv4 TTL configurable.
* Make TCP MSS configurable.
* Make TCP sequence number configurable.
* Make ICMP payload size configurable.
* Add debug output.
* Move command line argument parsing out of network functions.
* Make the code somehow PEP-8 compliant.

MFC after:	1 week
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D38122

(cherry picked from commit f57218e469a7b1ab40521ea75ebfd45b493851ca)
</content>
</entry>
<entry>
<title>netpfil tests: improve sniffer.py</title>
<updated>2023-01-29T05:37:46Z</updated>
<author>
<name>Kajetan Staszkiewicz</name>
<email>vegeta@tuxpowered.net</email>
</author>
<published>2023-01-20T01:40:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8968ad84e959d31d059c4c2990fe2d7554613ac0'/>
<id>urn:sha1:8968ad84e959d31d059c4c2990fe2d7554613ac0</id>
<content type='text'>
Multiple improvements to sniffer.py:

* Remove ambiguity of configuring recvif, it must be now explicitly specified.
* Don't catch exceptions around creating the sniffer, let it properly
  fail and display the whole stack trace.
* Count correct packets so that duplicates can be found.

MFC after:	1 week
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D38120

(cherry picked from commit a39dedeb31052ec74b0cd394d56f8d7cc8534645)
</content>
</entry>
<entry>
<title>pf tests: test fast port re-use with syncookies</title>
<updated>2023-01-28T01:34:38Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2022-12-31T18:23:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2cfb60783900b625798c5ceb52b9aa93c5c412ae'/>
<id>urn:sha1:2cfb60783900b625798c5ceb52b9aa93c5c412ae</id>
<content type='text'>
When a src/dst ip/port tuple is re-used before the pf state fully
expires we clean up the state and create a new one, unless syncookies
are enabled.

Test this, by running two back-to-back nc sessions, with a fixed source
port. Move the interface and IP to a different (vnet) jail, to trick the
network stack into letting us do this.

MFC after:      2 weeks
Event:          Aberdeen hackathon 2022
Differential Revision:  https://reviews.freebsd.org/D36886

(cherry picked from commit dc698b2cd59ebc08b05a261dbba8ee5707450d28)
</content>
</entry>
<entry>
<title>wg: Re-add basic if_wg(4) tests.</title>
<updated>2023-01-24T05:18:28Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2022-12-16T20:01:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c45a44b20ae078144454a63ca82861581c456635'/>
<id>urn:sha1:c45a44b20ae078144454a63ca82861581c456635</id>
<content type='text'>
These were originally added in commit
74ae3f3e33b810248da19004c58b3581cd367843 but have been updated to use
wg(8).

Reviewed by:	kevans, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37400

(cherry picked from commit 8fb9739615da8922fbd8988ccd77093d4ca335ba)
</content>
</entry>
<entry>
<title>netlink: allow creating sockets with SOCK_DGRAM.</title>
<updated>2023-01-23T22:10:01Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-01-21T14:36:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=edf966085e44b0aefcc8cd4f74d22b1bd09d3d60'/>
<id>urn:sha1:edf966085e44b0aefcc8cd4f74d22b1bd09d3d60</id>
<content type='text'>
Some existing applications setup Netlink socket with
SOCK_DGRAM instead of SOCK_RAW. Update the manpage to clarify
that the default way of creating the socket should be with
SOCK_RAW. Update the code to support both SOCK_RAW and SOCK_DGRAM.

Reviewed By: pauamma
Differential Revision: https://reviews.freebsd.org/D38075

(cherry picked from commit 0079d177ab69168df5e103128a2b15bd8e74d4eb)
</content>
</entry>
<entry>
<title>netlink: fix compatibility with older netlink applications.</title>
<updated>2023-01-23T22:09:05Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-01-16T12:14:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=92d8e0f136576d8a57e374fa4e460fc8903b68b6'/>
<id>urn:sha1:92d8e0f136576d8a57e374fa4e460fc8903b68b6</id>
<content type='text'>
Some apps try to provide only the non-zero part of the required message
 header instead of the full one. It happens when fetching routes or
 interface addresses, where the first header byte is the family.
This behavior is "illegal" under the "strict" Netlink socket option,
 however there are many applications out there doing things in the
 "old" way.

Support this usecase by copying the provided bytes into the temporary
 zero-filled header and running the parser on this header instead.

Reported by:	Goran Mekić &lt;meka@tilda.center&gt;

(cherry picked from commit 228c632ab3f6245df4a08d8692d49c8e12aacc27)
</content>
</entry>
</feed>
