From 07c062d6a75bd542f658e411752abfde9c3b7dca Mon Sep 17 00:00:00 2001 From: aestrin Date: Mon, 19 Jan 2009 17:16:19 +0000 Subject: [PATCH] [ipoib cm] fix for fragmented UDP packet. Don't check UDP packet size if it is fragmented. Fragment size of large UDP packet could be less than udp_hdr size and shouldn't fail. (Submitted by Alex Naslednikov ) git-svn-id: svn://openib.tc.cornell.edu/gen1@1843 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- branches/ipoib_cm/kernel/ipoib_port.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/branches/ipoib_cm/kernel/ipoib_port.c b/branches/ipoib_cm/kernel/ipoib_port.c index bdbc98dc..f8a2bbbd 100644 --- a/branches/ipoib_cm/kernel/ipoib_port.c +++ b/branches/ipoib_cm/kernel/ipoib_port.c @@ -3763,6 +3763,15 @@ __send_mgr_filter_udp( p_udp_hdr = (udp_hdr_t*)GetIpPayloadPtr(p_ip_hdr); } /* Get the UDP header and check the destination port numbers. */ + + if (p_ip_hdr->offset > 0) { + /* This is a fragmented part of UDP packet + * Only first packet will contain UDP header in such case + * So, return if offset > 0 + */ + return NDIS_STATUS_PENDING; + } + if( buf_len < sizeof(udp_hdr_t) ) { IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, -- 2.46.0