diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index bdd51ee2e053..124b09f58608 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -205,6 +205,8 @@ struct bootpc_globalcontext { #define TAG_DHCP_SERVERID 54 #define TAG_DHCP_LEASETIME 51 +#define TAG_VENDOR_INDENTIFIER 60 + #define DHCP_NOMSG 0 #define DHCP_DISCOVER 1 #define DHCP_OFFER 2 @@ -1309,7 +1311,9 @@ bootpc_compose_query(struct bootpc_ifcontext *ifctx, struct bootpc_globalcontext *gctx, struct thread *td) { unsigned char *vendp; + unsigned char vendor_client[64]; uint32_t leasetime; + uint8_t vendor_client_len; ifctx->gotrootpath = 0; @@ -1334,6 +1338,14 @@ bootpc_compose_query(struct bootpc_ifcontext *ifctx, *vendp++ = 2; *vendp++ = (sizeof(struct bootp_packet) >> 8) & 255; *vendp++ = sizeof(struct bootp_packet) & 255; + + snprintf(vendor_client, sizeof(vendor_client), "%s:%s:%s", + ostype, MACHINE, osrelease); + vendor_client_len = strlen(vendor_client); + *vendp++ = TAG_VENDOR_INDENTIFIER; + *vendp++ = vendor_client_len; + memcpy(vendp, vendor_client, vendor_client_len); + vendp += vendor_client_len;; ifctx->dhcpquerytype = DHCP_NOMSG; switch (ifctx->state) { case IF_DHCP_UNRESOLVED: