git: 9664345efb8b - main - libpfctl: Return max_win and mss of state peers

From: R. Christian McDonald <rcm_at_FreeBSD.org>
Date: Tue, 13 Oct 2026 14:50:03 UTC
The branch main has been updated by rcm:

URL: https://cgit.FreeBSD.org/src/commit/?id=9664345efb8bb598536fd069c0dd797fc60ce1d2

commit 9664345efb8bb598536fd069c0dd797fc60ce1d2
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-10-13 14:48:15 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-10-13 14:49:47 +0000

    libpfctl: Return max_win and mss of state peers
    
    The kernel sends PF_STP_MAX_WIN and PF_STP_MSS for both peers of a
    state, but struct pfctl_state_peer has no fields for them and libpfctl
    dropped them.  Add the fields and parse the attributes.
    
    Reviewed by:            kp
    Sponsored by:           Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D60544
---
 lib/libpfctl/libpfctl.c | 2 ++
 lib/libpfctl/libpfctl.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index 16a6ce8c7702..6d7c45ff993f 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -1917,6 +1917,8 @@ static const struct snl_attr_parser nla_p_speer[] = {
 	{ .type = PF_STP_SEQLO, .off = _OUT(seqlo), .cb = snl_attr_get_uint32 },
 	{ .type = PF_STP_SEQHI, .off = _OUT(seqhi), .cb = snl_attr_get_uint32 },
 	{ .type = PF_STP_SEQDIFF, .off = _OUT(seqdiff), .cb = snl_attr_get_uint32 },
+	{ .type = PF_STP_MAX_WIN, .off = _OUT(max_win), .cb = snl_attr_get_uint16 },
+	{ .type = PF_STP_MSS, .off = _OUT(mss), .cb = snl_attr_get_uint16 },
 	{ .type = PF_STP_STATE, .off = _OUT(state), .cb = snl_attr_get_uint8 },
 	{ .type = PF_STP_WSCALE, .off = _OUT(wscale), .cb = snl_attr_get_uint8 },
 };
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 850afd5eac47..0484024bec17 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -359,6 +359,8 @@ struct pfctl_state_peer {
 	uint32_t			 seqdiff;
 	uint8_t				 state;
 	uint8_t				 wscale;
+	uint16_t			 max_win;
+	uint16_t			 mss;
 };
 
 struct pfctl_state_key {