Page MenuHomeFreeBSD

D10863.1776899154.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D10863.1776899154.diff

Index: sys/net/if_pfsync.h
===================================================================
--- sys/net/if_pfsync.h
+++ sys/net/if_pfsync.h
@@ -50,6 +50,7 @@
#define _NET_IF_PFSYNC_H_
#define PFSYNC_VERSION 5
+#define PFSYNC_REVISION 1
#define PFSYNC_DFLTTL 255
#define PFSYNC_ACT_CLR 0 /* clear all states */
@@ -99,7 +100,7 @@
struct pfsync_header {
u_int8_t version;
- u_int8_t _pad;
+ u_int8_t revision;
u_int16_t len;
u_int8_t pfcksum[PF_MD5_DIGEST_LENGTH];
} __packed;
@@ -110,8 +111,8 @@
struct pfsync_subheader {
u_int8_t action;
- u_int8_t _pad;
- u_int16_t count;
+ u_int8_t size; /* Structure size in 16-bits. */
+ 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
@@ -1547,6 +1547,7 @@
offset += sizeof(*ph);
ph->version = PFSYNC_VERSION;
+ ph->revision = PFSYNC_REVISION;
ph->len = htons(sc->sc_len - sizeof(*ip));
bcopy(V_pf_status.pf_chksum, ph->pfcksum, PF_MD5_DIGEST_LENGTH);
@@ -1577,6 +1578,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 +1600,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 +1618,7 @@
bzero(subh, sizeof(*subh));
subh->action = PFSYNC_ACT_EOF;
+ subh->size = 0;
subh->count = htons(1);
V_pfsyncstats.pfsyncs_oacts[PFSYNC_ACT_EOF]++;

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 11:05 PM (9 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28412107
Default Alt Text
D10863.1776899154.diff (1 KB)

Event Timeline