On Wed, Dec 30, 2009 at 11:27 AM, Sasha Khapyorsky <sas...@voltaire.com> wrote:
> On 11:09 Wed 30 Dec     , Hal Rosenstock wrote:
>> On Tue, Dec 29, 2009 at 10:07 AM, Sasha Khapyorsky <sas...@voltaire.com> 
>> wrote:
>> >
>> > Verify that port number values received from network are in range and
>> > valid for access. Report error otherwise.
>>
>> Won't this spam the OpenSM log ?
>
> Yes, unfortunately. But unlike SA queries, etc., this is response to
> OpenSM originated request and messing attribute modifier there is more
> critical there than just invalid query from some client.

I wasn't referring to just SA queries.

I don't think this is consistent with your treatment of other proposed
error messages.

> However basically I am sharing your concerns. Maybe we need a separate
> log level for things like that (OSM_LOG_WARNING or so).

I think the logging needs more than just another level.

-- Hal

>> > Signed-off-by: Sasha Khapyorsky <sas...@voltaire.com>
>> > ---
>> >  opensm/opensm/osm_slvl_map_rcv.c |    9 +++++++++
>> >  1 files changed, 9 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/opensm/opensm/osm_slvl_map_rcv.c 
>> > b/opensm/opensm/osm_slvl_map_rcv.c
>> > index b35d867..6229db9 100644
>> > --- a/opensm/opensm/osm_slvl_map_rcv.c
>> > +++ b/opensm/opensm/osm_slvl_map_rcv.c
>> > @@ -104,8 +104,17 @@ void osm_slvl_rcv_process(IN void *context, IN void 
>> > *p_data)
>> >
>> >        /* in case of a non switch node the attr modifier should be ignored 
>> > */
>> >        if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
>> > +               unsigned num_ports = osm_node_get_num_physp(p_node) - 1;
>> >                out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
>> >                in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
>> > +               if (in_port_num > num_ports || out_port_num > num_ports) {
>> > +                       OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C07"
>> > +                               "Invalid attribute modifier 0x%x reveived 
>> > in"
>>
>>            ^^^^^^^^
>>
>>             typo
>
> Thanks for finding. I'm fixing this.
>
> Sasha
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to