Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp972973pxb; Fri, 22 Apr 2022 15:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+4/W2yBpnejFoh4BZJyHIb59jzMFeifFrr6ELAuzJup1KwRCeDm1VRlkM0r1X+BjOm0ge X-Received: by 2002:a17:903:1c9:b0:158:e1b9:b395 with SMTP id e9-20020a17090301c900b00158e1b9b395mr7044124plh.20.1650667330879; Fri, 22 Apr 2022 15:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667330; cv=none; d=google.com; s=arc-20160816; b=szCsRwRs369EvE9Gat1kRpE9pdZE1MHrOTE7v50fwn9h73R61p0SJBJ2V97oZteypX UzN4hsZALVivrOSplK+J+YwG962tKq9QdrlFVq71K8ZeGy/cNwCdoEtJlFRbdoTVIFT/ JhDYSgceTir1UfMDY4dL2gnEScLCgvDJCQHkaDZd6GSW6+AuGRsGlaPEsRP0uM/aR31x hwAwdJDF5ky5iPldp92L2qeQP9yD19S/xFjKh5YtSWWTIu+7QCTeF0xqfhwxrX/dTtYh GrCF6TcUB+xkpylpGmrv0MXgi9PxwcgvXeH/asg4lIDliY24ITAi+druZ4kxfXdz4UOj dWPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=gHWZSaJeb0kclIH+CxG9bdtPS5ELkz0JHxRRl/XiVHA=; b=BAr7rT1BlIn6Hmy1L33/LouCahvW5UkOIgNYkvCLAZrIi4nTLpq4Hi9gwTNqhpr8ZM 4qV11KDNyzKTfePhMfDG4TF1vMiBmESQdu5ulc3X8YwcEf/2HUHtoUdX92rg0RJzapEi 04bLgeFpHBdqj2qqGImmHqeClI9/XBEAUg63aPJmky3+O5xO+jXyItbvd2/2orNxf8fa KA4kaaUu3mnM/qXtvZl/p5z3O6gj+Q6qde0a+9sSBDu9FzNHnQESCH+Ht7C8xoDjT7CY 6spHxAHLB30t4atpsvYS8TiVJiXDzLDSSumtK5FIxDrORPwwcPqtULt0ZulP0QCBIU28 I6DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ai6KXWtd; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w12-20020a63160c000000b00398729a9c16si9642782pgl.271.2022.04.22.15.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ai6KXWtd; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E922D284DB6; Fri, 22 Apr 2022 13:30:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356569AbiDTXtA (ORCPT + 99 others); Wed, 20 Apr 2022 19:49:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230418AbiDTXs7 (ORCPT ); Wed, 20 Apr 2022 19:48:59 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF91B3B2AC for ; Wed, 20 Apr 2022 16:46:11 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id n134so3592732iod.5 for ; Wed, 20 Apr 2022 16:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=gHWZSaJeb0kclIH+CxG9bdtPS5ELkz0JHxRRl/XiVHA=; b=ai6KXWtdtJh0XzbbEImgFQgbhoYJIYuH1m3BRsrr+BPZHivO+Z5WfAE2iCRJJeorgM +0s0pCO9aedaKjRilDEHg6b91AluDOkaStuM0MtLhX0HaKUzSTPBMjkMZXLQCBc4Br2r Iz1EHAHGUuVZrjj479i1MXYVcL0M/YebefSHjcco5MtV+wCnN6bfzSx2hQP2lCoq1h0I DqosVgjYm7BCCGO+61v2U6A1527Z0QyyWa5Pr2DXtcng5B6aTScvTlTZphtG5eD8sa9Z dYJzt0a25yvcUjrbdvx6Qzr9mWZbTCf5TefBXwiwfDWO+x5M6JxXkISKug37p9scKdwS XLPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=gHWZSaJeb0kclIH+CxG9bdtPS5ELkz0JHxRRl/XiVHA=; b=qfskhy6Ujz20li9tUPsZfxpH5pHrAcWaEi95aCnODfebI/d6Bswt3iWH/hwX1+6Ot2 jYrXEeVWXYofPiTFvGOyk2hbMyCbwd3tsSfW9Mtoz/mBaAiaH6XdUlm81n6+M5kveZTB JvHSQoHthfK1GvdOApwD3YFyY3JdMrVcXCsAB+kqRmhnoGoiw+yihuWMFHjGvFLqkayC Z+vB3IlcA+yWsA367ef8lzhagiod5XiYms870hqckd969h8nACoKGCdDxHwKrk7eYC3D A2OiG+twvrHKIKqPF03u226+rgabbW1cneDRjCPUm7NM5HZgjeE6dmilE8YLYaZyyPV1 neGw== X-Gm-Message-State: AOAM532muHn0xUj5ARWFrqT1QsLGElACQ04FDuomdsDmXv9ASjRYfBYl Md2pCO5oaOkUprTioHAXZ6NgU7FcGzc= X-Received: by 2002:a05:6638:3283:b0:32a:75a3:3925 with SMTP id f3-20020a056638328300b0032a75a33925mr4987866jav.248.1650498371051; Wed, 20 Apr 2022 16:46:11 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id b19-20020a5d8553000000b00649f02b1b0csm12291013ios.39.2022.04.20.16.46.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 16:46:10 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] btmon: Fix decoding of Enhanced Credit Connection Request Date: Wed, 20 Apr 2022 16:46:09 -0700 Message-Id: <20220420234609.2968138-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This fixes the decoding of Enhanced Credit Connection Request which was not accounting the fields correctly causing 2 extra Source CID to be printed. --- monitor/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 4e449854a..01825ce0a 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -1331,7 +1331,7 @@ static void sig_ecred_conn_req(const struct l2cap_frame *frame) const struct bt_l2cap_pdu_ecred_conn_req *pdu = frame->data; uint16_t scid; - l2cap_frame_pull((void *)frame, frame, sizeof(pdu)); + l2cap_frame_pull((void *)frame, frame, sizeof(*pdu)); print_psm(pdu->psm); print_field("MTU: %u", le16_to_cpu(pdu->mtu)); -- 2.35.1