<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libpfctl, branch release/14.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-09-29T18:29:50Z</updated>
<entry>
<title>libpfctl: ensure we return useful error codes</title>
<updated>2024-09-29T18:29:50Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2024-09-20T09:36:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e3a9f4123f76205d0b85715f3f60aa1d9dc02887'/>
<id>urn:sha1:e3a9f4123f76205d0b85715f3f60aa1d9dc02887</id>
<content type='text'>
Return errno rather than -1 on error. This allows pfctl to report much
more useful errors.

Reported by:	Alexander Leidinger &lt;Alexander@Leidinger.net&gt;
MFC after:	1 week

(cherry picked from commit 93e96359c980ccf318fe089b30b863f7c910b622)
</content>
</entry>
<entry>
<title>libpfctl: fix incorrect pcounters array size</title>
<updated>2024-05-13T15:28:02Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2024-04-26T14:07:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=14c2c7913c908e4c446cb809e1d7a620cedc16b6'/>
<id>urn:sha1:14c2c7913c908e4c446cb809e1d7a620cedc16b6</id>
<content type='text'>
The array is 2 x 2 x 2, not 2 x 2 x 3.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
MFC after:	2 weeks

(cherry picked from commit a3f7176523e8611b259cefd7431c01e24f446db7)
</content>
</entry>
<entry>
<title>libpfctl: handle pfctl_do_ioctl() failures better</title>
<updated>2023-11-24T09:19:13Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-11-17T09:19:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=68013761ce7403bce5ab842885eceade23488796'/>
<id>urn:sha1:68013761ce7403bce5ab842885eceade23488796</id>
<content type='text'>
Ensure that we free nvlists and other allocations if pfctl_do_ioctl()
fails.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 498934c5ff51e6b0d3199db5d27ed11b1e8b9582)
</content>
</entry>
<entry>
<title>libpfctl: handle allocation failure</title>
<updated>2023-11-24T09:19:08Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-11-17T09:14:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8423bf2a9e60a12e5978ed453eb16533247fa25a'/>
<id>urn:sha1:8423bf2a9e60a12e5978ed453eb16533247fa25a</id>
<content type='text'>
While it's unlikely for userspace to fail to allocate memory it is still
possible. Handle malloc() returning NULL.

Reported by:	Bill Meeks &lt;bill@themeeks.net&gt;
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 33d55d0d0f33787e9e2796b5000be73af42573bc)
</content>
</entry>
<entry>
<title>pf: expose more syncookie state information to userspace</title>
<updated>2023-11-13T07:10:27Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-11-06T21:20:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=94b8a547c53b675a775fa824b433e23e5a28aee6'/>
<id>urn:sha1:94b8a547c53b675a775fa824b433e23e5a28aee6</id>
<content type='text'>
Allow userspace to retrieve low and high water marks, as well as the
current number of half open states.

MFC after:	1 week
Sponsored by:	Modirum MDPay

(cherry picked from commit a6173e94635b03aa7aab90a67785c8c3e7c6247b)
</content>
</entry>
<entry>
<title>libpfctl: be more tolerant of kernel extensions</title>
<updated>2023-11-07T15:46:52Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-10-27T12:13:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=228ae54114e1efbe82686090bed9d2c8071ecea0'/>
<id>urn:sha1:228ae54114e1efbe82686090bed9d2c8071ecea0</id>
<content type='text'>
Allow the kernel to supply more array elements than expected, but cut
off when we hit what we think the maximum is. This will improve forward
compatibility (i.e. old userspace with newer kernel).

Reviewed by:	zlei
MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D42392

(cherry picked from commit 2b1eb63fc9c6d6f64baaac59b7ea7c2a3228c03f)
</content>
</entry>
<entry>
<title>libpfctl: remove unused field from struct pfctl_states</title>
<updated>2023-11-02T15:10:00Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-10-30T18:04:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e158fa4c54d67b4c35d523c959196b2ff2c28cd4'/>
<id>urn:sha1:e158fa4c54d67b4c35d523c959196b2ff2c28cd4</id>
<content type='text'>
We never populate this, or use it, so remove it.

MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 87c5032353106764f324e82541662f448e68f38a)
</content>
</entry>
<entry>
<title>libpfctl: add missing pfctl_status_lcounter() function</title>
<updated>2023-11-02T15:10:00Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-10-30T18:02:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=71ae1f462bb4c6f730fc558bca0dbe569c48b003'/>
<id>urn:sha1:71ae1f462bb4c6f730fc558bca0dbe569c48b003</id>
<content type='text'>
We already had accessors for the other types of counters, but not this
one.

MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 1c824f430a395cdc66e22406e72f20ebd300e47e)
</content>
</entry>
<entry>
<title>libpfctl: fix Coverity issues</title>
<updated>2023-11-01T09:05:49Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-10-23T11:46:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=275078f1725179371dd53c7abac1850b98dac1a0'/>
<id>urn:sha1:275078f1725179371dd53c7abac1850b98dac1a0</id>
<content type='text'>
 - handle snl_finalize_msg() returning NULL
 - insert the correct data into the states list
 - add missing nvlist_destroy()
 - incorrect order for array bounds

Coverity:	1522929, 1522925, 1522923, 1522921, 1522780, 1522770, 1522764, 1487785, 1471250
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D42330

(cherry picked from commit 4abc3b482e0d246cd3518622223795c8de102130)
</content>
</entry>
<entry>
<title>libpfctl: fix pfctl_do_ioctl()</title>
<updated>2023-11-01T09:05:49Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2023-10-23T11:43:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9f5ab6bddfc0974b385f2a198878f739424fd040'/>
<id>urn:sha1:9f5ab6bddfc0974b385f2a198878f739424fd040</id>
<content type='text'>
pfctl_do_ioctl() copies the packed request data into the request buffer
and then frees it. However, it's possible for the buffer to be too small
for the reply, causing us to allocate a new buffer. We then copied from
the freed request, and freed it again.

Do not free the request buffer until we're all the way done.

PR:		274614
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D42329

(cherry picked from commit 2cffb52514b070e716e700c7f58fdb8cd9b05335)
</content>
</entry>
</feed>
