From patchwork Wed Feb 20 14:47:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2167611 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 32F62E00C6 for ; Wed, 20 Feb 2013 14:47:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964780Ab3BTOrX (ORCPT ); Wed, 20 Feb 2013 09:47:23 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:60323 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933257Ab3BTOrV (ORCPT ); Wed, 20 Feb 2013 09:47:21 -0500 Received: by mail-ie0-f175.google.com with SMTP id c12so10043259ieb.34 for ; Wed, 20 Feb 2013 06:47:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding:x-gm-message-state; bh=V836iaeUIp55MUN5pZXHmAVK+w8r8KYOSwRSxLJmDEo=; b=e7EAKLea4OwDckPZbEY610v4ySt0CJ+M2TIgLC71gG4rTKtX4pihlnv68etvfjGmjC Xtvahc6uNiVZ6aU6m5hD/C38xcMpugIkg31jOpV8llFWQkVPLwXL2yz+A3dtB6R6udOE tRJafMH6Y1kRB4umSH3V5ZMxrhb8PabcyUaInjRA8nDVfAqs8S52+7TxkVXS+WHGmRWP L1In7vo1G/ruAF3xL0HOSZG0Rpeswtl8+6RBSPhYBrjYPMXHe519Gso7myqGPXRPsSlc 1ob/Mbq1OXLBLDGACLtWj1KaWw8jKbOH/G5cQ11uTRH/C5zI5rW6zSPPcQOomzdXX1QQ rVsw== X-Received: by 10.42.88.145 with SMTP id c17mr9282064icm.47.1361371641223; Wed, 20 Feb 2013 06:47:21 -0800 (PST) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPS id qn10sm13467572igc.6.2013.02.20.06.47.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 06:47:20 -0800 (PST) Message-ID: <5124E1F6.3060501@dev.mellanox.co.il> Date: Wed, 20 Feb 2013 09:47:18 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Daniel Klein Subject: [PATCH] libvendor/osm_vendor_ibumad.c: fix mad validation in case of multipath record response X-Gm-Message-State: ALoCoQn3fV50lY5Vze8OHZbej8kCX2RdgMl5hzZ4mSk3lcuBAWp6y3kZcQ6ynjYRCvk8Rl5M+t7z Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org o15-0.2-1.11: SA response to a SubnAdmGetMulti() containing MultiPathRecord shall have PathRecord attribute ID. Signed-off-by: Daniel Klein Signed-off-by: Yevgeny Kliteynik Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/libvendor/osm_vendor_ibumad.c b/libvendor/osm_vendor_ibumad.c index 63b9594..f0427a3 100644 --- a/libvendor/osm_vendor_ibumad.c +++ b/libvendor/osm_vendor_ibumad.c @@ -415,10 +415,18 @@ static void *umad_receiver(void *p_ptr) * and make sure that attribute ID, attribute * modifier and transaction ID are the same in * request and response. + * + * Exception for o15-0.2-1.11: + * SA response to a SubnAdmGetMulti() containing a + * MultiPathRecord shall have PathRecord attribute ID. */ p_req_mad = osm_madw_get_mad_ptr(p_req_madw); if (PF(ib_mad_is_response(p_req_mad) || - p_mad->attr_id != p_req_mad->attr_id || + (p_mad->attr_id != p_req_mad->attr_id && + !(p_mad->mgmt_class == IB_MCLASS_SUBN_ADM && + p_req_mad->attr_id == + IB_MAD_ATTR_MULTIPATH_RECORD && + p_mad->attr_id == IB_MAD_ATTR_PATH_RECORD)) || p_mad->attr_mod != p_req_mad->attr_mod || p_mad->trans_id != p_req_mad->trans_id)) { OSM_LOG(p_vend->p_log, OSM_LOG_ERROR,