The branch stable/13 has been updated by kp:

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

commit c6745a0cc40e77ed3b783a0a8050b42bdf682e57
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2022-02-01 07:56:49 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2022-02-09 09:40:58 +0000

    pflog: align header to 4 bytes, not 8
    
    6d4baa0d01 incorrectly rounded the lenght of the pflog header up to 8
    bytes, rather than 4.
    
    PR:             261566
    Reported by:    Guy Harris <ghar...@sonic.net>
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 4daa31c10867b133bdc2a424e1e60d280384dc56)
---
 sys/net/if_pflog.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/net/if_pflog.h b/sys/net/if_pflog.h
index 0406f78474a8..443c1cc36cf6 100644
--- a/sys/net/if_pflog.h
+++ b/sys/net/if_pflog.h
@@ -33,7 +33,6 @@
 
 #include <sys/types.h>
 
-#include <net/bpf.h>
 #include <net/if.h>
 
 #define        PFLOGIFS_MAX    16
@@ -60,7 +59,9 @@ struct pfloghdr {
        u_int8_t        pad2[3];
 };
 
-#define        PFLOG_HDRLEN            BPF_WORDALIGN(offsetof(struct pfloghdr, 
pad2))
+#define PFLOG_ALIGNMENT                sizeof(uint32_t)
+#define PFLOG_ALIGN(x)         (((x) + PFLOG_ALIGNMENT - 1) & 
~(PFLOG_ALIGNMENT - 1))
+#define        PFLOG_HDRLEN            PFLOG_ALIGN(offsetof(struct pfloghdr, 
pad2))
 /* minus pad, also used as a signature */
 #define        PFLOG_REAL_HDRLEN       offsetof(struct pfloghdr, pad2)
 

Reply via email to