mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
Lease IP on REQUEST if address is free
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
This commit is contained in:
parent
7d936b3cdf
commit
6de9b112d8
1 changed files with 6 additions and 0 deletions
|
@ -702,6 +702,12 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
|||
break;
|
||||
}
|
||||
|
||||
if (!lease) {
|
||||
/* check if requested address free */
|
||||
lease = add_lease(dhcp_server, OFFER_TIME,
|
||||
packet.chaddr, htonl(requested_nip));
|
||||
}
|
||||
|
||||
if (lease && requested_nip == lease->lease_nip) {
|
||||
debug(dhcp_server, "Sending ACK");
|
||||
send_ACK(dhcp_server, &packet,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue