In revision 1.407 of <net/pfvar.h>, deraadt@ replaced MAXPATHLEN
with PATH_MAX so userland wouldn't have to pull in <sys/param.h>.

In 1.466, sashan@ accidentally slipped one MAXPATHLEN back in,
because its use is ubiquitous on the kernel side of pf.  Switch
this over to PATH_MAX again.

pfctl(8) doesn't actually use this, so it's very cosmetic.

Index: sys/net/pfvar.h
===================================================================
RCS file: /cvs/src/sys/net/pfvar.h,v
retrieving revision 1.496
diff -u -p -r1.496 pfvar.h
--- sys/net/pfvar.h     24 Aug 2020 15:30:58 -0000      1.496
+++ sys/net/pfvar.h     13 Oct 2020 20:21:04 -0000
@@ -475,7 +475,7 @@ union pf_rule_ptr {
 };
 
 #define        PF_ANCHOR_NAME_SIZE      64
-#define        PF_ANCHOR_MAXPATH       (MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 1)
+#define        PF_ANCHOR_MAXPATH       (PATH_MAX - PF_ANCHOR_NAME_SIZE - 1)
 #define        PF_OPTIMIZER_TABLE_PFX  "__automatic_"
 
 struct pf_rule {
-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to