[IPOIB] IPoIB PXE boot support: Filter proxy DHCP requests too.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 28 Jun 2009 10:08:39 +0000 (10:08 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 28 Jun 2009 10:08:39 +0000 (10:08 +0000)
Signed off by: ftillier@windows.microsoft.com

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2273 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

inc/kernel/ip_packet.h
ulp/ipoib/kernel/ipoib_port.c

index a712938..12fdb35 100644 (file)
@@ -432,6 +432,7 @@ typedef struct _igmp_v2_hdr
 \r
 #define DHCP_PORT_SERVER               CL_HTON16(67)\r
 #define DHCP_PORT_CLIENT               CL_HTON16(68)\r
+#define DHCP_PORT_PROXY_SERVER CL_HTON16(4011)\r
 \r
 #define DHCP_REQUEST                   1\r
 #define DHCP_REPLY                             2\r
index ff7ff5b..76a0140 100644 (file)
@@ -2072,7 +2072,11 @@ __recv_mgr_filter(
                        if( (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_SERVER &&\r
                                p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_CLIENT) ||\r
                                (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_CLIENT &&\r
-                               p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_SERVER) )\r
+                               p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_SERVER) ||\r
+                               (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_PROXY_SERVER &&\r
+                               p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_CLIENT) ||\r
+                               (p_ipoib->type.ip.prot.udp.hdr.dst_port == DHCP_PORT_CLIENT &&\r
+                               p_ipoib->type.ip.prot.udp.hdr.src_port == DHCP_PORT_PROXY_SERVER) )\r
                        {\r
                                if( len < (sizeof(ipoib_hdr_t) + sizeof(ip_hdr_t) +\r
                                        sizeof(udp_hdr_t) + DHCP_MIN_SIZE) )\r
@@ -2256,7 +2260,7 @@ __recv_dhcp(
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
-       p_option = &p_dhcp->options[4];\r
+       p_option = &p_dhcp->options[DHCP_COOKIE_SIZE];\r
        while( *p_option != DHCP_OPT_END && p_option < &p_dhcp->options[312] )\r
        {\r
                switch( *p_option )\r