[ofw] FW: Patch: [IPOIB] IPoIB PXE boot support: Clear remainder of chaddr

Smith, Stan stan.smith at intel.com
Mon Aug 17 16:31:14 PDT 2009


Tzachi Dar wrote:
> A small patch (attached, with commit message) against current WinOF,
> which removes trailing garbage bytes from the DHCP chaddr field when
> using a Windows DHCP server and the latest IPoIB PXE code.
>
> --- a/ulp/ipoib/kernel/ipoib_port.c
> +++ b/ulp/ipoib/kernel/ipoib_port.c
> @@ -2349,6 +2349,8 @@ __recv_dhcp(
>               RtlFillMemory(&p_cid[11], 12, 0);
>
>               RtlCopyMemory( p_dhcp->chaddr, &p_src->mac,
> sizeof(p_src->mac) );
> +             RtlFillMemory( &p_dhcp->chaddr[sizeof(p_src->mac)],
> +                            ( sizeof(p_dhcp->chaddr) -
> sizeof(p_src->mac) ), 0 );
>       }
>       IPOIB_EXIT( IPOIB_DBG_RECV );
>       return status;
>
> Thanks,
>
> Michael

Committed to trunk & WinOF.

Revision: 2364
Author: stansmith
Date: 4:17:41 PM, Monday, August 17, 2009
Message:
[IPoIB] IPoIB PXE boot support: Clear remainder of chaddr

    The IPoIB PXE boot firmware (gPXE) now sends the 8-byte port GUID in
    the DHCP chaddr field.  WinOF replaces the first 6 bytes of chaddr
    with the Ethernet-style MAC address, but leaves the remainder
    untouched.  This results in trailing garbage after the Ethernet-style
    MAC in the modified chaddr.

    Fix by explicitly zeroing the remainder of chaddr.

    Signed-off-by: Michael Brown <mcb30 at etherboot.org>
----
Modified : /gen1/branches/WOF2-1/ulp/ipoib/kernel/ipoib_port.c
Modified : /gen1/trunk/ulp/ipoib/kernel/ipoib_port.c



More information about the ofw mailing list