Page MenuHomeFreeBSD

kp (Kristof Provost)
Troubleshooter

Projects (7)

User Details

User Since
Sep 28 2014, 7:22 PM (635 w, 3 d)

Recent Activity

Yesterday

kp committed rGf0a73867d7af: libpfctl: fix reading of struct pfr_tstats.pfrts_cnt.
Wed, Dec 2, 5:12 PM
kp committed rG7249630da951: snmp_pf: fix pfTablesTblNumber.
Wed, Dec 2, 5:11 PM
kp committed rG9143d19fa33a: snmp_pf: fix table indexes.
Wed, Dec 2, 5:11 PM
kp committed rG24f18915cffa: pf: do not copy tag/match_tag/qid/pqid from userspace.
Wed, Dec 2, 5:11 PM

Tue, Dec 1

kp committed rG6c5783d83c95: pf tests: fix return code for ioctl/validation:addrule.
Tue, Dec 1, 10:08 PM
kp committed rG7bda067b6017: pf: fix displaying expired states.
Tue, Dec 1, 10:08 PM
kp committed rG05d2b052be4b: if_ovpn: defer freeing of struct ovpn_kkey_dir.
Tue, Dec 1, 10:08 PM
kp committed rG69a8b1bbe311: pf: extend stricter checking for ICMPv6 packets.
Tue, Dec 1, 10:08 PM

Mon, Nov 30

kp committed rGcec350375d60: dummynet: mark sysctls as CTLFLAG_VNET (authored by jim_netgate.com).
Mon, Nov 30, 10:25 AM
kp committed rGb65057a684ee: pf: fix error handling in pf_ioctl_addrule().
Mon, Nov 30, 10:24 AM
kp committed rGf3cb62f79807: pfsync: account for second tickover in bulk updates.
Mon, Nov 30, 10:24 AM

Fri, Nov 27

kp committed rGbd2eb4580da2: dummynet: validate object length before fixed-size copies in do_config() (authored by ojanerif_amd.com).
Fri, Nov 27, 12:24 PM
kp committed rG837762525dd2: pf: fix nat46 ICMP handling.
Fri, Nov 27, 12:24 PM
kp committed rG659562f3c9fe: pf: Free the stack key when attaching it collides (authored by rcm).
Fri, Nov 27, 12:24 PM
kp committed rG29ab1cce6b3a: pf: fix sctp normalisation cleanup.
Fri, Nov 27, 12:24 PM
kp committed rG2a2918a4a2ef: pf tests: test pfTablesTblCount in snmp_pf.
Fri, Nov 27, 12:24 PM
kp committed rG6c0f5b267160: pf: improve anchor string validation.
Fri, Nov 27, 12:24 PM
kp committed rGd2e23af62497: dummynet: validate object length before fixed-size copies in do_config() (authored by ojanerif_amd.com).
Fri, Nov 27, 12:24 PM
kp committed rG020754fe1123: pf: Free the stack key when attaching it collides (authored by rcm).
Fri, Nov 27, 12:24 PM
kp committed rGdf2e0c29b6b4: pf: fix sctp normalisation cleanup.
Fri, Nov 27, 12:24 PM
kp committed rG6a53b88afa8e: pf tests: test pfTablesTblCount in snmp_pf.
Fri, Nov 27, 12:24 PM
kp committed rGca687fba31c6: pf: improve anchor string validation.
Fri, Nov 27, 12:23 PM
kp accepted D61462: net: traverse interface groups under the network epoch.
Fri, Nov 27, 9:01 AM · network
kp added a comment to D61462: net: traverse interface groups under the network epoch.

https://reviews.freebsd.org/D15409 seems to be where if_groups was changed to be protected by epoch, so yes, this change is correct, but I really wish we'd document our locking requirements for structures.
For example, what OpenBSD do here: https://github.com/openbsd/src/blob/f56013ce12824aeab6aaacd268affe8326b7d888/sys/net/pfvar_priv.h#L131

Fri, Nov 27, 9:01 AM · network
kp added a comment to D61462: net: traverse interface groups under the network epoch.
In D61462#1423216, @rcm wrote:

I don't think we can use epoch here, since ifgl is protected by IFNET_WLOCK...

As I understand it, writers hold IFNET_WLOCK, but readers don't need it. if_groups, ifg_members and ifg_head have been CK lists since 4f6c66cc9c75, and _if_delgroup_locked() unlinks under the write lock, drops it and does NET_EPOCH_WAIT() before freeing the ifg_list, ifg_member and ifg_group.

That's my understanding as well. The CK_* structures are safe for concurrent readers and a single writer, but not safe for concurrent writers. In other words: we can read without any lock, but need to take a lock to change the CK_*.

Fri, Nov 27, 8:45 AM · network

Thu, Nov 26

kp committed rG75599b318433: pf: fix unlocked anchor access in DIOCGETETHRULESET.
Thu, Nov 26, 5:17 PM
kp committed rGc514361dbe90: pf: fix memory leak on failure in DIOCADDETHRULE.
Thu, Nov 26, 5:17 PM
kp committed rGdde37e7d2014: pf: fix NULL dereference on failure in DIOCADDETHRULE.
Thu, Nov 26, 5:17 PM
kp committed rG6805375783d0: dummynet: copy only the user-visible scheduler in copy_obj() (authored by ojanerif_amd.com).
Thu, Nov 26, 3:41 PM
kp closed D61962: dummynet: copy only the user-visible scheduler in copy_obj().
Thu, Nov 26, 3:41 PM

Wed, Nov 25

kp committed rGe02e3aec3b05: dummynet: do not log when a listing fills the buffer (authored by ojanerif_amd.com).
Wed, Nov 25, 4:08 PM
kp committed rG06b4369e637f: pf: hold PF_RULES_xLOCK when calling pf_find_keth_ruleset().
Wed, Nov 25, 4:08 PM
kp committed rGa38bc03561f8: pf: protect against the ethernet rule going away during DIOCGETETHRULE.
Wed, Nov 25, 4:08 PM
kp committed rGfab0d0ed67f9: pf: don't forget to CURVNET_RESTORE().
Wed, Nov 25, 4:08 PM
kp closed D61964: dummynet: do not log when a listing fills the buffer.
Wed, Nov 25, 4:08 PM
kp added inline comments to D61962: dummynet: copy only the user-visible scheduler in copy_obj().
Wed, Nov 25, 2:54 PM

Tue, Nov 24

kp added a comment to D61962: dummynet: copy only the user-visible scheduler in copy_obj().

I've got this one and the other dummynet fix in D61964 on my todo list to review & commit. I'm not going to promise *when*, but they're on my list.

Tue, Nov 24, 6:23 PM
kp committed rGba70b704053f: pf: include orig_kif in the mark-and-sweep cleanup mechanism.
Tue, Nov 24, 12:54 PM
kp committed rG96c545176df7: pf: don't allow any ioctl calls until we're fully initialised.
Tue, Nov 24, 12:54 PM

Mon, Nov 23

kp added a comment to D60109: ovpn(4): Set the FIB on received packets.

Oh boy, at least you are now seeing weirdness similar to what I was
experiencing before, including differences between native testing and
within a jail.
What was the git hash of the checkout you've been testing with?

Mon, Nov 23, 8:45 PM
kp committed rGc556863aad24: pf: fully free rule on error.
Mon, Nov 23, 6:12 PM
kp committed rG46c84f4e884c: pf: hold PF_RULES_RLOCK while copying out ethernet rules.
Mon, Nov 23, 6:12 PM
kp committed rGfd59b508f07d: pf: fix removing kif when clearing flags.
Mon, Nov 23, 6:12 PM
kp committed rG5162690ed3cf: pf: handle anchor or anchor_call not being passed in PFNL_CMD_ADDRULE.
Mon, Nov 23, 6:12 PM
kp committed rG162c1ae57c84: pf: fix double free on error.
Mon, Nov 23, 6:12 PM
kp committed rG5395ce57223d: pf: remove DIOCCHANGEADDR.
Mon, Nov 23, 6:12 PM

Sun, Nov 22

kp added a comment to D61927: cleanup: drop support for EOL FreeBSD 14.4 (after 2026-12-31).

The libpfctl changes look good. I didn't remove 14.4 when I added 15.2 because it wasn't quite EoL yet, so it gets to be removed later.

Sun, Nov 22, 9:14 PM

Thu, Nov 19

kp committed rG5165da26f31f: pf: fix nat46 ICMP handling.
Thu, Nov 19, 5:00 PM
kp committed rGe53632189f09: pf: fix sctp normalisation cleanup.
Thu, Nov 19, 5:00 PM
kp committed rGc589ea89f9f5: pf tests: run the ioctl tests in their own vnet too.
Thu, Nov 19, 5:00 PM
kp committed rG5131335c7d48: pf tests: test pfTablesTblCount in snmp_pf.
Thu, Nov 19, 5:00 PM
kp added a comment to D60109: ovpn(4): Set the FIB on received packets.
In D60109#1415248, @kp wrote:

I'm still seeing if_ovpn_fib:fibtun -> failed: 0 != 2 (0 != 2) [23.777s].

Thu, Nov 19, 4:00 PM
kp added a comment to D60109: ovpn(4): Set the FIB on received packets.

I'm still seeing if_ovpn_fib:fibtun -> failed: 0 != 2 (0 != 2) [23.777s].

Thu, Nov 19, 1:00 PM
kp committed rG0c1a482b4e4f: libpfctl: fix tstats address count.
Thu, Nov 19, 10:31 AM
kp committed rG4a97b40891f0: pfsync: don't apply a stale dst peer from a state update (authored by Maksym Hrytsaienko <hrytsaienko.my@gmail.com>).
Thu, Nov 19, 9:17 AM
kp added a comment to D60109: ovpn(4): Set the FIB on received packets.

Still, other networking components involved here seem to be fragile.
That's why I don't want to involve additional parts which may lead to
false-negative or - as in the past - false-positive results, i. e. I
don't want to run the test using VNET jails.

Basically all of the networking tests involve VNET. Certainly pretty much all of the pf tests do.

Thu, Nov 19, 7:29 AM

Wed, Nov 18

kp committed rGa139b43c356d: pf tests: Skip unmapped_mbuf:dummynet without dummynet (authored by Jaswanth Saravanan <jaswanth.s006@gmail.com>).
Wed, Nov 18, 7:23 PM
kp closed D61440: dummynet: validate object length before fixed-size copies in do_config().
Wed, Nov 18, 7:22 PM
kp committed rG42d358453d05: dummynet: validate object length before fixed-size copies in do_config() (authored by ojanerif_amd.com).
Wed, Nov 18, 7:22 PM
kp closed D61409: pf: reject table anchors with empty path components.
Wed, Nov 18, 7:22 PM
kp committed rG53e0d3fb3bcd: pf: reject table anchors with empty path components (authored by ojanerif_amd.com).
Wed, Nov 18, 7:22 PM
kp committed rGa396a0218cc5: pf: improve anchor string validation.
Wed, Nov 18, 7:22 PM
kp committed rG42bf1d9e83c8: pf: implement RFC 7112 Section 5.
Wed, Nov 18, 7:22 PM
kp added a comment to D60834: if_veb: Add veb(4) pseudo network device.

To be honest I still find the justification for an entirely new bridge to be very thin.

Wed, Nov 18, 5:18 PM · network
kp accepted D61037: if_epair: Hash the IP header, not the Ethernet header, for fanout.
Wed, Nov 18, 5:10 PM
kp accepted D61674: pf: Do not report a packet the outbound pass sent as dropped.

That makes sense, and is similar to how fragments are handled during reassembly. (Which is to say, the rest of the stack can cope just fine with us returning PASS and m == NULL.)

Wed, Nov 18, 4:54 PM
kp added a comment to D61413: pf: check anchor termination before stripping slashes.

I've taken my version mostly because it's a little closer to OpenBSD's code. There's nothing wrong with this patch, but I'm only fixing this once.

Wed, Nov 18, 4:33 PM
kp accepted D61409: pf: reject table anchors with empty path components.

Thanks for the fix!

Wed, Nov 18, 4:33 PM
kp accepted D61440: dummynet: validate object length before fixed-size copies in do_config().
Wed, Nov 18, 2:18 PM

Wed, Nov 11

kp added a comment to D61409: pf: reject table anchors with empty path components.

I’ll try to review this in detail next week, when I’m back.

Wed, Nov 11, 8:01 AM
kp added a comment to D61413: pf: check anchor termination before stripping slashes.

Coincidentally I have a very similar patch I wrote yesterday.
I’ll figure out if I like yours or mine better when I’m back next week.

Wed, Nov 11, 5:38 AM

Mon, Nov 9

kp committed rG8c9be10c1c3e: pf tests: make return.py more robust.
Mon, Nov 9, 9:27 PM
kp committed R11:9a3819cd2a2d: net/libpfctl: add 15.2, remove 15.0.
Mon, Nov 9, 8:59 PM

Nov 2 2026

kp accepted D61041: netinet6: Send redirects from ip6_tryforward().

LGTM

Nov 2 2026, 4:49 PM
kp committed rGa94d4deae39b: pf: allows TCP RST packets in the backwards window if ACK matches.
Nov 2 2026, 4:08 PM
kp committed rGe4a2b19aa961: pfctl: err(3) family functions should not be used with trailing \n.
Nov 2 2026, 1:25 PM
kp committed rG73bd8d4bf618: pf: fix DIOCXBEING/DIOCXROLLBACK/DIOCXCOMMIT error handling.
Nov 2 2026, 1:25 PM
kp committed rG240a76704b49: if_pfsync: fix mbuf leaks on errors.
Nov 2 2026, 1:25 PM
kp committed rG04b6d3e0be8c: if_pfsync: add missing unlock.
Nov 2 2026, 1:25 PM
kp committed rGd8b2c298a117: pfsync: improve underflow check.
Nov 2 2026, 1:25 PM
kp committed rGaf5313249730: pf: don't leak transaction elements on error.
Nov 2 2026, 1:25 PM

Oct 30 2026

kp accepted D61042: netinet6: Do not count a packet a hook consumed as discarded in ip6_tryforward().
Oct 30 2026, 4:26 PM
kp accepted D61039: netinet6: Decrement the hop limit before the outbound hooks in ip6_tryforward().
Oct 30 2026, 4:25 PM
kp accepted D61033: netinet6: Set PFIL_FWD in ip6_tryforward().
Oct 30 2026, 4:24 PM
kp accepted D61034: netinet6: Check the hop limit after pfil in ip6_tryforward().
Oct 30 2026, 2:57 PM
kp added a comment to D61037: if_epair: Hash the IP header, not the Ethernet header, for fanout.

Should we try to account for a VLAN header here too?

Oct 30 2026, 2:22 PM
kp added inline comments to D60894: pf: optimize state key comparison on amd4.
Oct 30 2026, 2:17 PM
kp committed rGc6a520af95b2: pfsync: improve handling of large packets.
Oct 30 2026, 2:15 PM
kp closed D60950: pfsync: avoid overflow on different timeouts.
Oct 30 2026, 2:15 PM
kp committed rG78b620b781b0: pfsync: avoid underflow on different timeouts.
Oct 30 2026, 2:15 PM
kp committed rGa94a6326507c: pf tests: exercise pfctl -l across a privilege drop (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rG3d5bd2cf202c: authpf: deny tracing of the pfctl child (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rG674932048a15: authpf: pass the privileged Netlink socket to pfctl (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rG87a5d76973ca: pfctl: add -l to use an inherited Netlink socket (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rG727e413ff3f1: libpfctl: add pfctl_open_from_nl_fd() and pfctl_nl_fd() (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rGe4c78de63e58: netlink_snl: add snl_init_fd() to adopt an already open socket (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rG489ded6d5231: netlink_snl: make snl_free() safe to call twice (authored by Avinash Duduskar <avinash.duduskar@gmail.com>).
Oct 30 2026, 2:08 PM
kp committed rG2e9ac12e9793: pf: fix pf_krule_item memory leak during counters:match_fail.
Oct 30 2026, 12:22 PM
kp committed rG9e7d55570f69: pf: remove armv7-specific counter code.
Oct 30 2026, 12:22 PM
kp committed rG2636cc0414fd: pf: have DIOCXBEGIN/DIOCXROLLBACK/DIOCXCOMMIT use the new functions.
Oct 30 2026, 12:21 PM