* [PATCH] opensm/osm_node_info_rec.c: Also handle non compliant SMA in ni_rcv_process_existing
@ 2012-07-02 12:54 Hal Rosenstock
[not found] ` <4FF19A0C.9010201-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-07-02 12:54 UTC (permalink / raw)
To: Alex Netes
Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
Daniel Klein
in case of NodeInfo.LocalPortNum > NodeInfo.NumPorts
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
opensm/osm_node_info_rcv.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/opensm/osm_node_info_rcv.c b/opensm/osm_node_info_rcv.c
index 9375e36..12e7693 100644
--- a/opensm/osm_node_info_rcv.c
+++ b/opensm/osm_node_info_rcv.c
@@ -782,6 +782,17 @@ static void ni_rcv_process_existing(IN osm_sm_t * sm, IN osm_node_t * p_node,
cl_ntoh64(p_ni->node_guid),
cl_ntoh64(p_smp->trans_id), p_node->discovery_count);
+ if (port_num > p_ni->num_ports) {
+ OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D0C: "
+ "Existing %s node GUID 0x%" PRIx64 "is non-compliant "
+ "and is being ignored since the "
+ "local port num %u > num ports %u\n",
+ ib_get_node_type_str(p_ni->node_type),
+ cl_ntoh64(p_ni->node_guid), port_num,
+ p_ni->num_ports);
+ goto Exit;
+ }
+
/*
If we haven't already encountered this existing node
on this particular sweep, then process further.
@@ -807,6 +818,7 @@ static void ni_rcv_process_existing(IN osm_sm_t * sm, IN osm_node_t * p_node,
ni_rcv_set_links(sm, p_node, port_num, p_ni_context);
+Exit:
OSM_LOG_EXIT(sm->p_log);
}
--
1.7.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] opensm/osm_node_info_rec.c: Also handle non compliant SMA in ni_rcv_process_existing
[not found] ` <4FF19A0C.9010201-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2012-07-25 7:51 ` Alex Netes
0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2012-07-25 7:51 UTC (permalink / raw)
To: Hal Rosenstock
Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
Daniel Klein
Hi Hal,
On 08:54 Mon 02 Jul , Hal Rosenstock wrote:
>
> in case of NodeInfo.LocalPortNum > NodeInfo.NumPorts
>
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-25 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 12:54 [PATCH] opensm/osm_node_info_rec.c: Also handle non compliant SMA in ni_rcv_process_existing Hal Rosenstock
[not found] ` <4FF19A0C.9010201-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-07-25 7:51 ` Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox