[syslinux] [PATCH 0/1] EFI PXE DHCP/proxyDHCP issues fix

Patrick Masotta masottaus at yahoo.com
Mon May 25 05:37:44 PDT 2015


>>>
 >       */
 >      Print(L"Getting cached packet ");
 > -    parse_dhcp(&mode->DhcpDiscover.Dhcpv4, pkt_len);
 > +   parse_dhcp(&mode->DhcpAck.Dhcpv4, pkt_len);
 
 When do you find client identifiers like the Vendor Class Identifier
 (option 60)?  DHCP servers generally don't respond with this data.
 
 Could the client identifiers provide any useful data?  Likely not but
 not sure entirely why the original author did this.  I'd probably lean
 towards keeping it as-is for now and perhaps separating this from the
 main reason for the patch.
<<<
 
From:
C:\UDK2014.SP1.P1.Complete\MyWorkSpace\NetworkPkg\UefiPxeBcDxe\PxeBcDhcp4.c/PxeBcDhcp4CallBack()

DhcpDiscover.Dhcpv4 gets populated at the "Dhcp4SendDiscover" event

...
  case Dhcp4SendDiscover:
    //
    // Cache the DHCPv4 discover packet to mode data directly.
    // It need to check SendGuid as well as Dhcp4SendRequest.
    //
    CopyMem (&Mode->DhcpDiscover.Dhcpv4, &Packet->Dhcp4, Packet->Length);
...

Then I think DhcpDiscover.Dhcpv4 is no the right packet for parsing here..
DhcpAck.Dhcpv4 instead will hold the required info.

I agree with you the author has a convoluted way for parsing the required info.
Please remember parse_dhcp() is invoked "twice" 
The second time it gets the PXE related info probably 
not available at the first call when parsing DhcpAck.Dhcpv4

Best,
Patrick




More information about the Syslinux mailing list