Send client identifier unconditionally. My ancient D-Link router response
with NACK if I don't set it. Setting 'option dhcp-client-identifier' is alternative but it is inconvenient because I have to keep the list of all MAC addresses. As bin/94743 pointed out, it is always sent from Windows clients and I found Mac OS X does the same. OK'd by: brooks
This commit is contained in:
parent
6cc12d1bb6
commit
473c2d129b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160089
@ -1480,7 +1480,6 @@ make_discover(struct interface_info *ip, struct client_lease *lease)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SEND_CLIENT_IDENTIFIER
|
|
||||||
/* set unique client identifier */
|
/* set unique client identifier */
|
||||||
char client_ident[sizeof(struct hardware)];
|
char client_ident[sizeof(struct hardware)];
|
||||||
if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) {
|
if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) {
|
||||||
@ -1494,7 +1493,6 @@ make_discover(struct interface_info *ip, struct client_lease *lease)
|
|||||||
options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1;
|
options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1;
|
||||||
options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF;
|
options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set up the option buffer... */
|
/* Set up the option buffer... */
|
||||||
ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0,
|
ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0,
|
||||||
@ -1606,7 +1604,6 @@ make_request(struct interface_info *ip, struct client_lease * lease)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SEND_CLIENT_IDENTIFIER
|
|
||||||
/* set unique client identifier */
|
/* set unique client identifier */
|
||||||
char client_ident[sizeof(struct hardware)];
|
char client_ident[sizeof(struct hardware)];
|
||||||
if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) {
|
if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) {
|
||||||
@ -1620,7 +1617,6 @@ make_request(struct interface_info *ip, struct client_lease * lease)
|
|||||||
options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1;
|
options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1;
|
||||||
options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF;
|
options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set up the option buffer... */
|
/* Set up the option buffer... */
|
||||||
ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0,
|
ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user