Page MenuHomeFreeBSD

vegeta_tuxpowered.net (Kajetan Staszkiewicz)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 6 2022, 11:10 AM (123 w, 5 d)

Recent Activity

Dec 9 2024

vegeta_tuxpowered.net added a comment to D47953: pf: Force logging if pf_create_state() fails.

Improve the situation a bit: force logging if state creation fails.
This isn't totally right as we'll end up logging the packet twice in
this case, but it's better than not logging the drop at all.

Dec 9 2024, 11:08 AM

Dec 5 2024

vegeta_tuxpowered.net committed rGad6562ec858f: pf: Don't pfsync states with unrecoverable routing information (authored by vegeta_tuxpowered.net).
pf: Don't pfsync states with unrecoverable routing information
Dec 5 2024, 10:10 PM
vegeta_tuxpowered.net closed D47906: pf: Don't pfsync states with unrecoverable routing information.
Dec 5 2024, 10:10 PM

Dec 4 2024

vegeta_tuxpowered.net updated the diff for D47906: pf: Don't pfsync states with unrecoverable routing information.

Improve some comments.

Dec 4 2024, 2:49 PM
vegeta_tuxpowered.net added inline comments to D47906: pf: Don't pfsync states with unrecoverable routing information.
Dec 4 2024, 1:50 PM
vegeta_tuxpowered.net requested review of D47906: pf: Don't pfsync states with unrecoverable routing information.
Dec 4 2024, 11:55 AM

Dec 3 2024

vegeta_tuxpowered.net committed rGc49c9da239ca: pf: Move route-to information to rule actions (authored by vegeta_tuxpowered.net).
pf: Move route-to information to rule actions
Dec 3 2024, 1:10 PM
vegeta_tuxpowered.net closed D47827: Draft: pf: Move route-to information to pf_rule_actions.
Dec 3 2024, 1:10 PM

Nov 29 2024

vegeta_tuxpowered.net updated the diff for D47827: Draft: pf: Move route-to information to pf_rule_actions.

Restore the old value of _Static_assert(sizeof(struct pf_kstate))

Nov 29 2024, 1:33 PM
vegeta_tuxpowered.net added inline comments to D47827: Draft: pf: Move route-to information to pf_rule_actions.
Nov 29 2024, 12:58 PM
vegeta_tuxpowered.net updated the diff for D47827: Draft: pf: Move route-to information to pf_rule_actions.

Plug holes in pf_rule_actions

Nov 29 2024, 8:31 AM

Nov 28 2024

vegeta_tuxpowered.net committed rGb9c0321d54e9: pf: Fix source node locking (authored by vegeta_tuxpowered.net).
pf: Fix source node locking
Nov 28 2024, 5:34 PM
vegeta_tuxpowered.net closed D47770: pf: Fix source node locking.
Nov 28 2024, 5:34 PM
vegeta_tuxpowered.net added inline comments to D47827: Draft: pf: Move route-to information to pf_rule_actions.
Nov 28 2024, 5:12 PM
vegeta_tuxpowered.net updated the diff for D47770: pf: Fix source node locking.

Use style(9)-compliant boolean tests

Nov 28 2024, 3:44 PM
vegeta_tuxpowered.net added a comment to D47827: Draft: pf: Move route-to information to pf_rule_actions.

As promised yesterday, I propose how to get further with simplifying source node handling. This is a draft/proposal, however it compiles and passes all tests, at least the ones not skipped, which for me are dummynet and altq, I need to revive my custom kernel config to get those running.

Nov 28 2024, 3:17 PM
vegeta_tuxpowered.net retitled D47827: Draft: pf: Move route-to information to pf_rule_actions from pf: Move route-to information to pf_rule_actions to Draft: pf: Move route-to information to pf_rule_actions.
Nov 28 2024, 3:16 PM
vegeta_tuxpowered.net requested review of D47827: Draft: pf: Move route-to information to pf_rule_actions.
Nov 28 2024, 3:16 PM
vegeta_tuxpowered.net updated the diff for D47770: pf: Fix source node locking.

Change limited to bool. Fix one missing PF_SRC_NODE… macro.

Nov 28 2024, 11:47 AM
vegeta_tuxpowered.net updated the diff for D47770: pf: Fix source node locking.

Make pf_hashsrc() available from everywhere. Use PF_SRC_NODE… macros now that pf_hashsrc() is accessible. The OB1 error in pf_insert_src_node() is gone, adjust the tests accordingly. Simplify pf_src_connlimit() logic,

Nov 28 2024, 11:43 AM
vegeta_tuxpowered.net closed D47697: pf: Set cleared time when zeroing stats for table addresses.
Nov 28 2024, 9:41 AM
vegeta_tuxpowered.net committed rG1a5dc6ee62b3: pf: Set cleared time when zeroing stats for table addresses (authored by vegeta_tuxpowered.net).
pf: Set cleared time when zeroing stats for table addresses
Nov 28 2024, 9:41 AM
vegeta_tuxpowered.net closed D47758: pf: Use a single pointer to state in pf_src_connlimit().
Nov 28 2024, 9:41 AM
vegeta_tuxpowered.net committed rG9f9cf83f114a: pf: Use a single pointer to state in pf_src_connlimit() (authored by vegeta_tuxpowered.net).
pf: Use a single pointer to state in pf_src_connlimit()
Nov 28 2024, 9:41 AM
vegeta_tuxpowered.net added inline comments to D47788: pf: extra route lookup in pf_route(6)().
Nov 28 2024, 9:23 AM
vegeta_tuxpowered.net added inline comments to D47783: pf: partially import OpenBSD's NAT rewrite.
Nov 28 2024, 9:10 AM

Nov 27 2024

vegeta_tuxpowered.net added inline comments to D47788: pf: extra route lookup in pf_route(6)().
Nov 27 2024, 5:21 PM
vegeta_tuxpowered.net added inline comments to D47783: pf: partially import OpenBSD's NAT rewrite.
Nov 27 2024, 5:11 PM
vegeta_tuxpowered.net added inline comments to D47770: pf: Fix source node locking.
Nov 27 2024, 12:23 PM

Nov 26 2024

vegeta_tuxpowered.net added a comment to D47770: pf: Fix source node locking.

This patch only aims to fix issues with locking, not the other issues found in D39880 (which will require some modifications, as while writing this one, I found some issues with the 2 different paths reaching pf_map_addr_sn(), which D39880 does not take into account). I suppose it could be MFC'd into the currently maintained releases of FreeBSD after more testing.

Nov 26 2024, 6:42 PM
vegeta_tuxpowered.net requested review of D47770: pf: Fix source node locking.
Nov 26 2024, 6:34 PM
vegeta_tuxpowered.net requested review of D47758: pf: Use a single pointer to state in pf_src_connlimit().
Nov 26 2024, 3:17 PM

Nov 22 2024

vegeta_tuxpowered.net abandoned D47698: pfctl: clear statistic for the address.

Duplicate of https://cgit.freebsd.org/src/commit/?id=6463b6b59152fb1695bbe0de78f6e2675c5a765a

Nov 22 2024, 3:31 PM

Nov 21 2024

vegeta_tuxpowered.net updated the summary of D47698: pfctl: clear statistic for the address.
Nov 21 2024, 10:22 PM
vegeta_tuxpowered.net requested review of D47698: pfctl: clear statistic for the address.
Nov 21 2024, 10:21 PM
vegeta_tuxpowered.net updated the diff for D47697: pf: Set cleared time when zeroing stats for table addresses.

There's no need for additional variable, time is used only once.

Nov 21 2024, 8:53 PM
vegeta_tuxpowered.net requested review of D47697: pf: Set cleared time when zeroing stats for table addresses.
Nov 21 2024, 8:39 PM
vegeta_tuxpowered.net committed rG7d929a444587: pf: Fix timestamps and connection rate in source node export (authored by vegeta_tuxpowered.net).
pf: Fix timestamps and connection rate in source node export
Nov 21 2024, 2:28 PM
vegeta_tuxpowered.net committed rGe8eb3096d8d1: pf: Fix missing connection rate for DIOCGETSRCNODES (authored by vegeta_tuxpowered.net).
pf: Fix missing connection rate for DIOCGETSRCNODES
Nov 21 2024, 2:28 PM
vegeta_tuxpowered.net closed D47321: pf: Fix timestamps and connection rate in source node export.
Nov 21 2024, 2:28 PM
vegeta_tuxpowered.net closed D47679: pf: Fix timestamps and connection rate in source node export to userspace.
Nov 21 2024, 2:28 PM

Nov 20 2024

vegeta_tuxpowered.net added a comment to D47321: pf: Fix timestamps and connection rate in source node export.

This code suffers from very old OpenBSD idea of (ab)using the same data structure for in-kernel storage and communication with userspace over ioctl. There is no need for struct pf_threshold *t, as pfctl only displays its count and seconds properties. Instead of having a separate function nlattr_add_pf_threshold() with all its PF_TH_… variables we could just add new variables PF_SN_CONN_RATE_RATE and PF_SN_CONN_RATE_SECONDS directly into the source node. And rename PF_SN_CREATION to PF_SN_AGE since it's the age of the SN, calculated during the export, not its creation time, as stored in kernel.

Nov 20 2024, 9:00 AM

Nov 19 2024

vegeta_tuxpowered.net added a comment to D47679: pf: Fix timestamps and connection rate in source node export to userspace.

This is also broken on FreeBSD 14.

Nov 19 2024, 10:10 PM
vegeta_tuxpowered.net updated the diff for D47321: pf: Fix timestamps and connection rate in source node export.
Nov 19 2024, 10:02 PM
vegeta_tuxpowered.net retitled D47321: pf: Fix timestamps and connection rate in source node export from pf: Fix timestamps in source node export to userspace to pf: Fix timestamps and connection rate in source node export.
Nov 19 2024, 10:01 PM
vegeta_tuxpowered.net updated the summary of D47679: pf: Fix timestamps and connection rate in source node export to userspace.
Nov 19 2024, 9:58 PM
vegeta_tuxpowered.net requested review of D47679: pf: Fix timestamps and connection rate in source node export to userspace.
Nov 19 2024, 9:55 PM

Nov 15 2024

vegeta_tuxpowered.net added a comment to D47543: pf: close nc file descriptors in killstates test.

So regardless of why I already stated this is a technical issue that is by no means "pointless", what do you suggest to improve this particular test to make it more robust? Uncontrolled creation of processes that inherit file descriptors isn't exactly clean design but I can see why you do not want to apply this mere bandaid with that larger issue at hand.

Nov 15 2024, 1:47 PM

Nov 13 2024

vegeta_tuxpowered.net closed D47435: pf tests: Simplify handling of pfctl -s.

Closed by commit rG65b20771713c: pf tests: Simplify handling of pfctl -s

Nov 13 2024, 8:46 AM

Nov 12 2024

vegeta_tuxpowered.net committed rG65b20771713c: pf tests: Simplify handling of pfctl -s (authored by vegeta_tuxpowered.net).
pf tests: Simplify handling of pfctl -s
Nov 12 2024, 5:21 PM
vegeta_tuxpowered.net closed D47440: pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes().
Nov 12 2024, 5:21 PM
vegeta_tuxpowered.net committed rG452e6f549cdb: pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes() (authored by vegeta_tuxpowered.net).
pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes()
Nov 12 2024, 5:21 PM

Nov 4 2024

vegeta_tuxpowered.net added a comment to D47435: pf tests: Simplify handling of pfctl -s.
In D47435#1081961, @kp wrote:
Nov 4 2024, 9:18 PM
vegeta_tuxpowered.net updated the summary of D47435: pf tests: Simplify handling of pfctl -s.
Nov 4 2024, 9:17 PM
vegeta_tuxpowered.net added inline comments to D39880: Fix source tracking for route-to rules and for global tracking.
Nov 4 2024, 8:21 PM
vegeta_tuxpowered.net requested review of D47440: pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes().
Nov 4 2024, 8:19 PM
vegeta_tuxpowered.net added inline comments to D39880: Fix source tracking for route-to rules and for global tracking.
Nov 4 2024, 6:42 PM
vegeta_tuxpowered.net requested review of D47435: pf tests: Simplify handling of pfctl -s.
Nov 4 2024, 3:57 PM

Oct 29 2024

vegeta_tuxpowered.net updated the diff for D39880: Fix source tracking for route-to rules and for global tracking.

Removed debug echos from tests.

Oct 29 2024, 6:34 PM
vegeta_tuxpowered.net retitled D39880: Fix source tracking for route-to rules and for global tracking from Draft: Fix source tracking for route-to rules and for global tracking to Fix source tracking for route-to rules and for global tracking.
Oct 29 2024, 6:26 PM
vegeta_tuxpowered.net updated the summary of D39880: Fix source tracking for route-to rules and for global tracking.
Oct 29 2024, 6:26 PM
vegeta_tuxpowered.net updated the summary of D39880: Fix source tracking for route-to rules and for global tracking.
Oct 29 2024, 6:23 PM
vegeta_tuxpowered.net updated the diff for D39880: Fix source tracking for route-to rules and for global tracking.
Oct 29 2024, 6:13 PM

Oct 28 2024

vegeta_tuxpowered.net requested review of D47321: pf: Fix timestamps and connection rate in source node export.
Oct 28 2024, 10:16 PM

Oct 4 2024

vegeta_tuxpowered.net updated the diff for D39880: Fix source tracking for route-to rules and for global tracking.

A more recent, slightly simplified version.

Oct 4 2024, 8:30 PM

Oct 2 2024

vegeta_tuxpowered.net requested review of D46880: pf: Fix double ruleset evaluation for fragments sent to dummynet.
Oct 2 2024, 7:28 PM
vegeta_tuxpowered.net added a comment to D46868: pf: Replace union pf_krule_ptr with struct pf_krule in in-kernel structs.
In D46868#1068815, @kp wrote:

Completely remove pf_krule_ptr

Oct 2 2024, 2:31 PM
vegeta_tuxpowered.net updated the summary of D46868: pf: Replace union pf_krule_ptr with struct pf_krule in in-kernel structs.
Oct 2 2024, 8:55 AM
vegeta_tuxpowered.net requested review of D46868: pf: Replace union pf_krule_ptr with struct pf_krule in in-kernel structs.
Oct 2 2024, 8:54 AM
vegeta_tuxpowered.net requested review of D46867: pf: Remove struct pf_pdesc->nat_rule.
Oct 2 2024, 8:38 AM

Oct 1 2024

vegeta_tuxpowered.net requested review of D46864: WIP: pf: Fix table counters.
Oct 1 2024, 8:49 PM

Sep 29 2024

vegeta_tuxpowered.net added inline comments to D46840: pf tests: Add test for max-src-states.
Sep 29 2024, 4:13 PM

Sep 28 2024

vegeta_tuxpowered.net updated the diff for D46840: pf tests: Add test for max-src-states.
Sep 28 2024, 9:11 PM
vegeta_tuxpowered.net updated the diff for D46840: pf tests: Add test for max-src-states.
Sep 28 2024, 9:10 PM
vegeta_tuxpowered.net updated the diff for D46840: pf tests: Add test for max-src-states.

Add test for another source, describe tests better, check for source nodes in order-independent manner.

Sep 28 2024, 9:09 PM
vegeta_tuxpowered.net requested review of D46840: pf tests: Add test for max-src-states.
Sep 28 2024, 8:52 PM

Sep 27 2024

vegeta_tuxpowered.net updated the diff for D46798: pf tests: Add a test for max-src-conn.

Update rules to match only on inet6 proto tcp.

Sep 27 2024, 4:52 PM
vegeta_tuxpowered.net updated the diff for D46798: pf tests: Add a test for max-src-conn.

Fix wrong cleanup function. Rename the test to …_rule because there will be in future another test for global source tracking.

Sep 27 2024, 4:30 PM
vegeta_tuxpowered.net requested review of D46819: pf: pf_clear_srcnodes() is always called with NULL.
Sep 27 2024, 3:56 PM
vegeta_tuxpowered.net updated the diff for D46798: pf tests: Add a test for max-src-conn.

Update test for the hitting the max-src-conn rule so that it works both when the state is found CLOSED or when there is no state at all.

Sep 27 2024, 3:31 PM
vegeta_tuxpowered.net added a comment to D46798: pf tests: Add a test for max-src-conn.
In D46798#1067230, @kp wrote:

I'm seeing this test fail quite often (though not always) because it can't find the 4204 state. So things appear to be doing what we'd expect, but there's no state. I'm not sure why, because it looks like we only check max_src_conn a state actually exists, so we ought to see it in the state table too. Sometimes that's the case, but not always.

For maximum annoyance that problem seems to go away if I attach a dtrace probe for pf_free_state(), so right now I have no idea what's causing that.
I'm not sure if we want to go dig into what's going on, or just change the test so it accepts either the state no existing or it being CLOSED as fine.

Sep 27 2024, 3:11 PM
vegeta_tuxpowered.net added inline comments to D46797: pf: Fix max-src-conn when rules are added via netlink.
Sep 27 2024, 9:30 AM
vegeta_tuxpowered.net added a comment to D46797: pf: Fix max-src-conn when rules are added via netlink.
In D46797#1067141, @kp wrote:

Thanks for spotting (and fixing) this.

One small issue though: all of your recent patches seem to end up moving files. This one moves libpfctl/libpfctl/libpfctl.c to libpfctl/libpfctl.c and sys/netpfil/pf/pf_nl.* to netpfil/pf/pf_nl.*.
I'll fix these manually before I push them, but can you take a look at how you generate future ones?

It may be worth testing tools/tools/git/git-arc.sh for this. It's what I use to pick commits out of Phabricator into my local git tree and to post local git commits to Phabricator. It makes the round trip a lot less painful.

Sep 27 2024, 9:29 AM

Sep 26 2024

vegeta_tuxpowered.net updated the diff for D46798: pf tests: Add a test for max-src-conn.

Simplify the check_tcp_3way functions, there is no need to sniff for our own ACK. Once it's sent out, we can assume the check has passed.

Sep 26 2024, 5:11 PM
vegeta_tuxpowered.net requested review of D46798: pf tests: Add a test for max-src-conn.
Sep 26 2024, 5:06 PM
vegeta_tuxpowered.net added inline comments to D46797: pf: Fix max-src-conn when rules are added via netlink.
Sep 26 2024, 4:08 PM
vegeta_tuxpowered.net requested review of D46797: pf: Fix max-src-conn when rules are added via netlink.
Sep 26 2024, 4:07 PM
vegeta_tuxpowered.net added inline comments to D46795: pf tests: Fix off-by-one error in max states.
Sep 26 2024, 2:27 PM
vegeta_tuxpowered.net updated the diff for D46795: pf tests: Fix off-by-one error in max states.

Removed the change in pf.c as the error was in the ruleset.

Sep 26 2024, 2:26 PM
vegeta_tuxpowered.net updated the diff for D46795: pf tests: Fix off-by-one error in max states.

I've withdrawn the move of the check from within to the outside of pf_create_state(). The way source nodes are cleaned up in case of state creation failure in the current code would not play nice with this change. The change comes from my own branch where source nodes allocation is performed slightly differently. I'll re-upload this patch when the time is right.

Sep 26 2024, 9:29 AM
vegeta_tuxpowered.net requested review of D46795: pf tests: Fix off-by-one error in max states.
Sep 26 2024, 9:06 AM

Sep 25 2024

vegeta_tuxpowered.net added inline comments to D46774: pf tests: Add max states test.
Sep 25 2024, 12:57 PM

Sep 24 2024

vegeta_tuxpowered.net requested review of D46776: pf: Split pf_map_addr() .
Sep 24 2024, 4:57 PM
vegeta_tuxpowered.net updated the diff for D46774: pf tests: Add max states test.
Sep 24 2024, 3:50 PM
vegeta_tuxpowered.net requested review of D46774: pf tests: Add max states test.
Sep 24 2024, 3:47 PM
vegeta_tuxpowered.net requested review of D46773: pf tests: Make TCP port numbers configurable.
Sep 24 2024, 3:26 PM
vegeta_tuxpowered.net requested review of D46772: pf tests: Remove nargs from single arguments.
Sep 24 2024, 3:22 PM

Sep 9 2024

vegeta_tuxpowered.net added inline comments to D46590: pf: factor out rule counter update code.
Sep 9 2024, 6:08 PM

Aug 15 2024

vegeta_tuxpowered.net requested review of D46310: pf: 'sticky-address' requires 'keep state'.
Aug 15 2024, 6:59 PM

Aug 14 2024

vegeta_tuxpowered.net requested review of D46298: pf: Fix indentation in struct pf_ksrc_node.
Aug 14 2024, 4:42 PM