Print this page
7388 Support DHCP Client FQDN. Allow IAID/DUID for all v4.
@@ -18,10 +18,11 @@
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
*/
#include <sys/types.h>
#include <time.h>
#include <netinet/in.h>
@@ -460,10 +461,13 @@
}
/* Add required Option Request option */
(void) add_pkt_prl(dpkt, dsmp);
+ /* Add FQDN if configured */
+ (void) dhcp_add_fqdn_opt(dpkt, dsmp);
+
return (send_pkt_v6(dsmp, dpkt, dsmp->dsm_server,
stop_extending, irt, mrt));
} else {
dhcp_lif_t *lif = dsmp->dsm_lif;
ipaddr_t server;
@@ -488,11 +492,12 @@
/*
* dsm_reqhost was set for this state machine in
* dhcp_selecting() if the REQUEST_HOSTNAME option was set and
* a host name was found.
*/
- if (dsmp->dsm_reqhost != NULL) {
+ if (dhcp_add_fqdn_opt(dpkt, dsmp) != 0 &&
+ dsmp->dsm_reqhost != NULL) {
(void) add_pkt_opt(dpkt, CD_HOSTNAME, dsmp->dsm_reqhost,
strlen(dsmp->dsm_reqhost));
}
(void) add_pkt_opt(dpkt, CD_END, NULL, 0);