mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Augmented cookie format to store the seeds used to generate IPv4 and IPv6 addresses.
This ensures that if the IP previously used by a user is free, it will be reassigned to him after a reconnection with the same cookie.
This commit is contained in:
@@ -96,6 +96,13 @@ struct proc_st {
|
||||
char hostname[MAX_HOSTNAME_SIZE]; /* the requested hostname */
|
||||
uint8_t cookie[COOKIE_SIZE]; /* the cookie associated with the session */
|
||||
|
||||
/* if the session is initiated by a cookie the following two are set
|
||||
* and are considered when generating an IP address.
|
||||
*/
|
||||
uint8_t seeds_are_set; /* non zero if the following two elements are set */
|
||||
uint8_t ipv4_seed[4];
|
||||
uint8_t ipv6_seed[16];
|
||||
|
||||
void * auth_ctx; /* the context of authentication */
|
||||
unsigned auth_status; /* PS_AUTH_ */
|
||||
unsigned auth_reqs; /* the number of requests received */
|
||||
|
||||
Reference in New Issue
Block a user