[ofw] [PATCH 1/2] IPoIB PXE boot support: Filter proxy DHCP requeststoo

Tzachi Dar tzachid at mellanox.co.il
Sun Jun 28 03:09:27 PDT 2009


Applied on 2205.

Thanks
Tzachi 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Wednesday, May 27, 2009 8:04 PM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH 1/2] IPoIB PXE boot support: Filter 
> proxy DHCP requeststoo
> 
> In the later stages of PXE boot, a proxy DHCP request can be 
> received.  Currently that request will not get the DHCP 
> filtering resulting in a DHCP packet that the proxy DHCP 
> server doesn't understand.  The patch defines the proxy DHCP 
> port, and adds filtering for received DHCP packets that come 
> to/from a proxy DHCP server.
> 
> Signed-off-by: Fab Tillier <ftillier at microsoft.com>
> 
> Index: ulp/ipoib/kernel/ipoib_port.c
> ===================================================================
> --- ulp/ipoib/kernel/ipoib_port.c	(revision 2205)
> +++ ulp/ipoib/kernel/ipoib_port.c	(working copy)
> @@ -2072,7 +2072,11 @@ __recv_mgr_filter(
>  			if( 
> (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_SERVER &&
>  				
> p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_CLIENT) ||
>  				
> (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_CLIENT &&
> -				
> p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_SERVER) )
> +				
> p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_SERVER) ||
> +				
> (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_PROXY_SERVER &&
> +				
> p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_CLIENT) ||
> +				
> (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_CLIENT &&
> +				
> p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_PROXY_SERVER) )
>  			{
>  				if( len < (sizeof(ipoib_hdr_t) 
> + sizeof(ip_hdr_t) +
>  					sizeof(udp_hdr_t) + 
> DHCP_MIN_SIZE) ) @@ -2256,7 +2260,7 @@ __recv_dhcp(
>  		return IB_INVALID_PARAMETER;
>  	}
>  
> -	p_option = &p_dhcp->options[4];
> +	p_option = &p_dhcp->options[DHCP_COOKIE_SIZE];
>  	while( *p_option != DHCP_OPT_END && p_option < 
> &p_dhcp->options[312] )
>  	{
>  		switch( *p_option )
> Index: inc/kernel/ip_packet.h
> ===================================================================
> --- inc/kernel/ip_packet.h	(revision 2205)
> +++ inc/kernel/ip_packet.h	(working copy)
> @@ -432,6 +432,7 @@ typedef struct _igmp_v2_hdr
>  
>  #define DHCP_PORT_SERVER		CL_HTON16(67)
>  #define DHCP_PORT_CLIENT		CL_HTON16(68)
> +#define DHCP_PORT_PROXY_SERVER	CL_HTON16(4011)
>  
>  #define DHCP_REQUEST			1
>  #define DHCP_REPLY				2
> 



More information about the ofw mailing list