diff options
author | 2010-01-10 23:54:21 +0000 | |
---|---|---|
committer | 2010-01-10 23:54:21 +0000 | |
commit | 4efe3db76e8ef36e372fa5336e892089734d1349 (patch) | |
tree | fc3dd627581a363adcf84a8cc040478e7ffb805c /sys/net/if_pfsync.h | |
parent | lex <=, >=, and != into a single token for correctness and to reduce the (diff) | |
download | wireguard-openbsd-4efe3db76e8ef36e372fa5336e892089734d1349.tar.xz wireguard-openbsd-4efe3db76e8ef36e372fa5336e892089734d1349.zip |
replace a pad in the pfsync subheader with a length field. it stores the
length of its message in dwords. multiply that by the count of the messages
to figure out how to skip to the next subheader.
"old" code still thinks the len field is a pad, which it doesnt look at, so
new messages with a filled in len are still parsed correctly by "old" code.
input and ok mcbride@
sounds good! Simon Perreault
Diffstat (limited to 'sys/net/if_pfsync.h')
-rw-r--r-- | sys/net/if_pfsync.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_pfsync.h b/sys/net/if_pfsync.h index 108dc47a341..6a6e024a3d5 100644 --- a/sys/net/if_pfsync.h +++ b/sys/net/if_pfsync.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.40 2009/11/09 23:46:38 dlg Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.41 2010/01/10 23:54:21 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -114,7 +114,7 @@ struct pfsync_header { u_int8_t version; u_int8_t _pad; - u_int16_t len; + u_int16_t len; /* in bytes */ u_int8_t pfcksum[PF_MD5_DIGEST_LENGTH]; } __packed; @@ -124,7 +124,7 @@ struct pfsync_header { struct pfsync_subheader { u_int8_t action; - u_int8_t _pad; + u_int8_t len; /* in dwords */ u_int16_t count; } __packed; |