p_eth = &p_desc->p_buf->eth.pkt;\r
#endif /*IPOIB_INLINE_RECV */\r
\r
- /* Don't report loopback traffic - we requested SW loopback. */\r
- if( !cl_memcmp( &p_port->p_adapter->mac, &p_eth->hdr.src,\r
- sizeof(p_port->p_adapter->mac) ) )\r
+ if( p_src )\r
{\r
- /*\r
- * "This is not the packet you're looking for" - don't update\r
- * receive statistics, the packet never happened.\r
- */\r
- cl_qlist_insert_tail( p_bad_list, &p_desc->item.list_item );\r
- /* Dereference the port object on behalf of the failed receive. */\r
- cl_obj_deref( &p_port->obj );\r
- continue;\r
+ /* Don't report loopback traffic - we requested SW loopback. */\r
+ if( !cl_memcmp( &p_port->p_adapter->mac, &p_src->mac,\r
+ sizeof(p_port->p_adapter->mac) ) )\r
+ {\r
+ /*\r
+ * "This is not the packet you're looking for" - don't update\r
+ * receive statistics, the packet never happened.\r
+ */\r
+ cl_qlist_insert_tail( p_bad_list, &p_desc->item.list_item );\r
+ /* Dereference the port object on behalf of the failed recv. */\r
+ cl_obj_deref( &p_port->obj );\r
+ continue;\r
+ }\r
}\r
\r
switch( p_ipoib->hdr.type )\r
\r
IPOIB_ENTER( IPOIB_DBG_ENDPT );\r
\r
+ if( !cl_memcmp( &mac, &p_port->p_adapter->mac, sizeof(mac) ) )\r
+ {\r
+ /* Discard loopback traffic. */\r
+ IPOIB_TRACE( IPOIB_DBG_WARN, ("Discarding loopback traffic\n") );\r
+ IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
+ return NDIS_STATUS_NO_ROUTE_TO_DESTINATION;\r
+ }\r
+\r
key = 0;\r
cl_memcpy( &key, &mac, sizeof(mac_addr_t) );\r
\r