Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp689063pxb; Tue, 5 Apr 2022 18:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY9sGsUdJvNncnl+okdBblJkFc6kxdINgKlBHOgXThPVmqrBvAWCKG7dlDTqnVWyC3SUHz X-Received: by 2002:a65:46c2:0:b0:385:fb1c:f0c4 with SMTP id n2-20020a6546c2000000b00385fb1cf0c4mr5094065pgr.405.1649210001656; Tue, 05 Apr 2022 18:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210001; cv=none; d=google.com; s=arc-20160816; b=mS1cafLZAV7bOqlXtPmX7rISqtv8u6K7bPpxlI9KEJm+pJL8IHdSNs/drc/R2PsVI+ BceJtrVpBiEKuCdLpe7dCZiFMy/8G0ZGgFAV2+hlCpt5dFWIzsDpTcH/pJ4wpVG0YrIk EBNoLPNBk6wk3Pdqk9oIxGxZqnOdxoyP3p5g+8chT+Ntl37C0jM9K75IrNM75MXt+fPB 9J+2zh8bANqKszv6XJCLiiwJL4/8dkUaJ4k+rQQwAcK7ilRqBcur7+UcaDurm38DAEGq uTDsN4sFowg5U6Iwp1KrIV6vFG5bJGnkOckpKMjUuyCrQHnu3AbWWev4aWYUOepv2ZXX 8cfQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pXxm/8IV232FzXTHSMx6zNnD0XbOGN1yq9tJNcVFOvc=; b=WcR4w5bC0+AHqKRvC+f9JVlTBl7Jmqe0XACv+UM0qPlMF123QVitzoZklNxJ/X0jVR nf6V5zGn7axWuN9fEZoZaZ3vAVnn7+1RAK4Tp8Y4PcGbsqeaMHbHP34YH15/sJHxCsxS 1KN+LuC2MFRmHXJU8yvqbjwoM++w8HqtEGzlJgUS8oirRty1FbiEoYJNDy2u0SJ+KbAq vAabqY9/HK+zs1pWoUuZZWGF+G8gqTMaSy8WchEl+Drmjih8fVPGuOwyz/FCihYys2N4 Oncv0mPBOf5o/B0wXjBTni6IDRYasTU6ppjVFnTx9F/t4AWzGv/cshAUhk2+WolKeJFC BeKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0HeO2xG6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d70-20020a636849000000b003816043f089si14674932pgc.638.2022.04.05.18.53.06; Tue, 05 Apr 2022 18:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0HeO2xG6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379881AbiDEMx1 (ORCPT + 99 others); Tue, 5 Apr 2022 08:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343509AbiDEJM1 (ORCPT ); Tue, 5 Apr 2022 05:12:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A4CE2714B; Tue, 5 Apr 2022 02:00:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D0A5DB81A12; Tue, 5 Apr 2022 09:00:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B01DC385A0; Tue, 5 Apr 2022 09:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149216; bh=765nafgncPzYKlYm6M6NLm/ZoKn9hQoPlzRpDgfuRZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0HeO2xG6wp6DYPLumhY/tCslnJY0wbS/IVUAZyt3uzh5gDSNb74kQSQVSvauaJ1Na RKJ55Qu2JqbjfB8F1OHXVi20UKSceakyKoozRsZjNM4KIGn6AUFCFydHO0egXbR9Rb 0Y1euWt5dxfHihN9gqfbnkpqs3oiJ9nVf9Z7NKi8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Hartkopp , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.16 0589/1017] vxcan: enable local echo for sent CAN frames Date: Tue, 5 Apr 2022 09:25:02 +0200 Message-Id: <20220405070411.762861475@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org From: Oliver Hartkopp [ Upstream commit 259bdba27e32368b4404f69d613b1c1014c07cbf ] The vxcan driver provides a pair of virtual CAN interfaces to exchange CAN traffic between different namespaces - analogue to veth. In opposite to the vcan driver the local sent CAN traffic on this interface is not echo'ed back but only sent to the remote peer. This is unusual and can be easily fixed by removing IFF_ECHO from the netdevice flags that are set for vxcan interfaces by default at startup. Without IFF_ECHO set on driver level, the local sent CAN frames are echo'ed in af_can.c in can_send(). This patch makes vxcan interfaces adopt the same local echo behavior and procedures as known from the vcan interfaces. Fixes: a8f820a380a2 ("can: add Virtual CAN Tunnel driver (vxcan)") Link: https://lore.kernel.org/all/20220309120416.83514-5-socketcan@hartkopp.net Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/vxcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c index 8861a7d875e7..be5566168d0f 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -148,7 +148,7 @@ static void vxcan_setup(struct net_device *dev) dev->hard_header_len = 0; dev->addr_len = 0; dev->tx_queue_len = 0; - dev->flags = (IFF_NOARP|IFF_ECHO); + dev->flags = IFF_NOARP; dev->netdev_ops = &vxcan_netdev_ops; dev->needs_free_netdev = true; -- 2.34.1