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
commit 9c6a03565d97434b82f0e6a0f2e6fdfcca8ee126
Author: Michael Brown <[email protected]>
Date:   Thu Aug 13 18:18:26 2009 +0100

    [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 <[email protected]>

diff --git a/ulp/ipoib/kernel/ipoib_port.c b/ulp/ipoib/kernel/ipoib_port.c
index 59ab6ce..4d1736f 100644
--- 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;
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to