Cedar: DHCP server now assigns static IPv4 address, if present in user note

This works for all VPN protocols.

In SessionMain(): for DHCPDISCOVER and DHCPREQUEST frames, write the static IP address (which is retrieved from the user notes) in the SIADDR field of DHCPHEADER.

In VirtualDhcpServer(): for DHCPDISCOVER and DHCPREQUEST frames, read the static IP address from the SIADDR field of DHCPHEADER and assign it to the client.
This commit is contained in:
PeTeeR authored and Davide Beatrici committed 2020-10-12 04:56:33 +02:00
1 parent 1c4b257a1b
commit b890c7d813
6 files changed
+240 -10

No files matched your search

+3
View File
@@ -339,6 +339,9 @@ void CancelList(LIST *o);
bool IsPriorityHighestPacketForQoS(void *data, UINT size);
UINT GetNextDelayedPacketTickDiff(SESSION *s);
UINT PrepareDHCPRequestForStaticIPv4(SESSION *s, BLOCK *b);
void ClearDHCPLeaseRecordForIPv4(SESSION *s, UINT static_ip);
#endif // SESSION_H