Change vpn_packet_t::seqno from uint32_t to uint8_t[4].
This is to make sure on-wire vpn_packet_t fields are always 1-byte aligned, otherwise padding could get in the way.
This commit is contained in:
parent
55a78da4e0
commit
092d620dbb
2 changed files with 21 additions and 18 deletions
|
|
@ -87,7 +87,7 @@ typedef union sockaddr_t {
|
|||
typedef struct vpn_packet_t {
|
||||
length_t len; /* the actual number of bytes in the `data' field */
|
||||
int priority; /* priority or TOS */
|
||||
uint32_t seqno; /* 32 bits sequence number (network byte order of course) */
|
||||
uint8_t seqno[4]; /* 32 bits sequence number (network byte order of course) */
|
||||
uint8_t data[MAXSIZE];
|
||||
} vpn_packet_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue