[ipxe-devel] [PATCH] [autoboot] Check Vendor Class ID from PROXYDHCP_SETTINGS_NAME

Anoob Soman anoob.soman at citrix.com
Fri Apr 21 13:06:31 UTC 2017


On 21/03/17 21:49, Michael Brown wrote:
> What is the purpose of this patch?  The "desired result" in the commit 
> log message appears to be undefined.
>
> Thanks,
>
> Michael


Hi Michael,

Extremely sorry, I completely missed this email.

Purpose of this patch is to fix a problem, when there are two different 
DHCPACK, one from DHCP server and other from proxy DHCP server, and both 
DHCP contain different Vendor Class Identifier (option 60).

After processing both DHCPACK, there will two settings registered, one 
with DHCP_SETTING_NAME and another with PROXYDHCP_SETTING_NAME. Both 
these settings will have DHCP_VENDOR_CLASS_ID in them, with different 
values.

When a query to get DHCP_VENDOR_CLASS_ID, using 
fetch_string_setting(NULL, &data) is made, most of time 
DHCP_VENDOR_CLASS_ID from setting DHCP_SETTING_NAME would be returned, 
which would not have "PXEClient" as value.

During pxeboot discovery, have_pxe_menu() need to look for 
DHCP_VENDOR_CLASS_ID from PROXYDHCP_SETTING_NAME first (if 
PROXYDHCP_SETTING_NAME is present, else look for DHCP_VENDOR_CLASS_ID 
from all other setting). The patch does this by first finding setting 
using find_setting(PROXYDHCP_SETTING_NAME) then passes that as an arg to 
fetch_string_setting(). If there are no PROXYDHCP_SETTING_NAME setting, 
then find_setting would return NULL and fetch_string_setting(NULL) will 
try to lookup from all settings.

If the commit message of this patch is not clear I can modify it as you 
want.

Sorry for the delay again,

Anoob.





More information about the ipxe-devel mailing list