Index: sys/net/if_pfsync.h =================================================================== --- sys/net/if_pfsync.h +++ sys/net/if_pfsync.h @@ -49,7 +49,7 @@ #ifndef _NET_IF_PFSYNC_H_ #define _NET_IF_PFSYNC_H_ -#define PFSYNC_VERSION 5 +#define PFSYNC_VERSION 6 #define PFSYNC_DFLTTL 255 #define PFSYNC_ACT_CLR 0 /* clear all states */ @@ -110,8 +110,8 @@ struct pfsync_subheader { u_int8_t action; - u_int8_t _pad; - u_int16_t count; + u_int8_t size; /* Word-size of structure. */ + u_int16_t count; /* Number of structures. */ } __packed; /* Index: sys/netpfil/pf/if_pfsync.c =================================================================== --- sys/netpfil/pf/if_pfsync.c +++ sys/netpfil/pf/if_pfsync.c @@ -1577,6 +1577,7 @@ bzero(subh, sizeof(*subh)); subh->action = pfsync_qs[q].action; + subh->size = pfsync_qs[q].len >> 1; subh->count = htons(count); V_pfsyncstats.pfsyncs_oacts[pfsync_qs[q].action] += count; } @@ -1598,6 +1599,7 @@ bzero(subh, sizeof(*subh)); subh->action = PFSYNC_ACT_UPD_REQ; + subh->size = sizeof(ur->ur_msg) >> 1; subh->count = htons(count); V_pfsyncstats.pfsyncs_oacts[PFSYNC_ACT_UPD_REQ] += count; } @@ -1615,6 +1617,7 @@ bzero(subh, sizeof(*subh)); subh->action = PFSYNC_ACT_EOF; + subh->size = 0; subh->count = htons(1); V_pfsyncstats.pfsyncs_oacts[PFSYNC_ACT_EOF]++;