Files
freebsd/lib
R. Christian McDonald a317317519 pf: Keep every chunk of a table that a ruleset defines
libpfctl sends a table definition in chunks of 256 addresses, each as
its own PFNL_CMD_INA_DEFINE.  The kernel treated every chunk as a new
definition and replaced the shadow table, so only the last chunk
survived.

Mark the chunks after the first with PF_ID_APPEND and have the kernel
add them to the shadow table in progress.  A request without the
attribute still replaces the shadow; one with it and no definition in
progress fails with EINVAL.  Old kernels ignore the attribute, so both
halves are needed; the ioctl sends all addresses at once and is not
affected.  Mask the flags userland passes to PFR_FLAG_ALLMASK, as
PFR_FLAG_APPEND is kernel-internal.

Add a test that defines a table of 1,000 addresses, also in an anchor.

Reviewed by:		kp
Fixes:			219ce30638 ("pf: convert DIOCRINADEFINE to netlink")
Sponsored by:		Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D60876
2026-10-20 08:52:00 -04:00
..
2026-09-22 08:23:32 -07:00
2026-01-13 10:19:04 -05:00
2026-09-01 15:28:28 +00:00
2026-01-06 12:56:50 -05:00
2026-09-13 18:09:38 -07:00
2026-09-01 14:49:24 +02:00
2026-03-15 00:41:29 -03:00
2025-11-24 10:47:10 -05:00
2026-10-18 11:24:20 -07:00
2026-09-16 14:22:09 +00:00
…
2026-01-06 04:26:53 +00:00
2026-03-13 23:49:53 +00:00
2026-04-08 14:22:45 -07:00
2026-01-15 07:28:28 +01:00
2026-09-15 10:22:38 -04:00