aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-07-28 09:24:44 +0000
committerKristof Provost <kp@FreeBSD.org>2021-07-31 08:12:20 +0000
commitadde304e53488bec9ec5ba4d589f365e9e0c4aad (patch)
tree09caa91cc5fe1a292d6ee3a89f360cb5d4cb80dd
parent7408fb55f03c71f73fca50be36a864c468713293 (diff)
downloadsrc-adde304e53488bec9ec5ba4d589f365e9e0c4aad.tar.gz
src-adde304e53488bec9ec5ba4d589f365e9e0c4aad.zip
pf: fix ABI breakage
The introduction of synproxy support changed the size of struct pf_status, which in turn broke the userspace ABI. Revert the relevant change. More work is needed on the synproxy code to keep and expose the counters, but in the mean time this restores the ABI. PR: 257469 MFC after: 3 days Sponsored by: Modirum MDPay (cherry picked from commit da8d8b22e69c72f1d001d55b5eff5acbb0265cfc)
-rw-r--r--sys/netpfil/pf/pf.h3
-rw-r--r--sys/netpfil/pf/pf_syncookies.c1
2 files changed, 1 insertions, 3 deletions
diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h
index 245d68b4be45..e030f1e59de0 100644
--- a/sys/netpfil/pf/pf.h
+++ b/sys/netpfil/pf/pf.h
@@ -160,8 +160,7 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE, PF_ADDR_DYNIFTL,
#define LCNT_SRCCONNRATE 4 /* max-src-conn-rate */
#define LCNT_OVERLOAD_TABLE 5 /* entry added to overload table */
#define LCNT_OVERLOAD_FLUSH 6 /* state entries flushed */
-#define LCNT_SYNCOOKIES_VALID 7 /* syncookies validated */ /* XXX TODO: Ensure no API breakage! */
-#define LCNT_MAX 8 /* total+1 */
+#define LCNT_MAX 7 /* total+1 */
#define LCNT_NAMES { \
"max states per rule", \
diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c
index 8699ae855ec8..744a12e4e21d 100644
--- a/sys/netpfil/pf/pf_syncookies.c
+++ b/sys/netpfil/pf/pf_syncookies.c
@@ -275,7 +275,6 @@ pf_syncookie_validate(struct pf_pdesc *pd)
if ((ack & ~0xff) != (hash & ~0xff))
return (0);
- counter_u64_add(V_pf_status.lcounters[LCNT_SYNCOOKIES_VALID], 1);
return (1);
}