Skip to content

Commit

Permalink
make notes about matching host only if fixed-address matches
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 22, 2019
1 parent eae5eac commit 0ab48cc
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c
Expand Up @@ -1121,6 +1121,7 @@ static rlm_isc_dhcp_info_t *get_host(REQUEST *request, rlm_isc_dhcp_info_t *head
{
VALUE_PAIR *vp;
isc_host_ether_t *ether, my_ether;
rlm_isc_dhcp_info_t *host = NULL;

/*
* Look up the host first by client identifier.
Expand All @@ -1134,7 +1135,10 @@ static rlm_isc_dhcp_info_t *get_host(REQUEST *request, rlm_isc_dhcp_info_t *head
my_client.client = &(vp->data);

client = fr_hash_table_finddata(head->client_identifiers, &my_client);
if (client) return client->host;
if (client) {
host = client->host;
goto done;
}
}


Expand All @@ -1146,7 +1150,16 @@ static rlm_isc_dhcp_info_t *get_host(REQUEST *request, rlm_isc_dhcp_info_t *head
ether = fr_hash_table_finddata(head->hosts, &my_ether);
if (!ether) return NULL;

return ether->host;
host = ether->host;

done:
/*
* @todo - check "fixed-address". This host entry should
* match ONLY if one of the addresses matches the network
* on which the client is booting.
*/

return host;
}


Expand Down

0 comments on commit 0ab48cc

Please sign in to comment.