Enforce assumption
This commit is contained in:
parent
deed73f28f
commit
1f1b8d7b99
1 changed files with 4 additions and 0 deletions
|
|
@ -48,6 +48,10 @@ int forked = 0; // Sanity check: CLI must not diddle with heartbeat table
|
||||||
|
|
||||||
#define MAX_HEART_SIZE (8192) // Maximum size of heartbeat packet. Must be less than max IP packet size :)
|
#define MAX_HEART_SIZE (8192) // Maximum size of heartbeat packet. Must be less than max IP packet size :)
|
||||||
#define MAX_CHANGES (MAX_HEART_SIZE/(sizeof(sessiont) + sizeof(int) ) - 2) // Assumes a session is the biggest type!
|
#define MAX_CHANGES (MAX_HEART_SIZE/(sizeof(sessiont) + sizeof(int) ) - 2) // Assumes a session is the biggest type!
|
||||||
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112
|
||||||
|
_Static_assert(sizeof(sessiont) >= sizeof(tunnelt));
|
||||||
|
_Static_assert(sizeof(sessiont) >= sizeof(bundlet));
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
int type;
|
int type;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue