Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3399806pxb; Tue, 19 Apr 2022 01:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiEBT5fBl/2z3nQe0OhTlgIqI0DNo1fLjp7m1uzkghzXVtlNLJtjRMGz+/5HgwxMuQgGAJ X-Received: by 2002:a05:6402:c84:b0:41d:72b5:fb05 with SMTP id cm4-20020a0564020c8400b0041d72b5fb05mr15637397edb.361.1650356558463; Tue, 19 Apr 2022 01:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650356558; cv=none; d=google.com; s=arc-20160816; b=oifaK3pToUazfOi7rETwLUpQNbBhX4ltpgN6SktA3SXYACwrvDECH8fKsx6PeWRVQY VyqqEsh60uY1RDgqmB9GNQsPj8XZiuhbDReQP82/vDaoI/P2UyvAkSjSmbJD58AMnAxL /cv7ZcKJ+l0bUJ2RGO7cTyIusFS1c7iGU3Gmf6h6ydfPyxygUfCHWTtDIqrzdmqsl83M NCnHqzG91fK5s1qMC724hy8HZDkvFDR0Zqufmtq22NTBRmVNKgPCpdjpZTVutsmK4W6a TRbltzgYkN6vroDE+vh7kCg8QPeYpsYDYCEgjH8w12fqb/DV4IUirUkwPR/q/BvhPePV q2XQ== 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=qS1xMGN5xorv1QiTByD1jEkgWaVf9/ZS7sR4tk6qkWg=; b=Ig+CXsCrEzJm0Ma+F0q3DpFEhPgS6gMyzvqj4ti7s8iLH8BiovYZe+e5yNy41aCqN3 KSPM9MBcq4sF5XCydPDQK4OIP3/UMIs86QtgW5z5Yp5OvAayA0fadRYHgonRStJw30l2 zW/OXN/dy3VLiMpyn3xugrcix75eLd5rHwTs0UzIA4RIb/RyrgyADl+4iAvTwX580h4T uv6z6qJsCKGYyIc1E4wNqaew7lpt3cgyaHRwb6z/kh5oeyY0abpwQYVo7aEahrvk6zc1 DcvFEUFC9dduahwzha9GVdAtMTNWuu2FN4xyDpAkWcbIBSrjclvsO8aJac4mytHkZosS H1gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Sl9FkzPm; 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 m26-20020a056402051a00b00421c744d1c7si7416422edv.538.2022.04.19.01.22.14; Tue, 19 Apr 2022 01:22:38 -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=Sl9FkzPm; 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 S245115AbiDRNwb (ORCPT + 99 others); Mon, 18 Apr 2022 09:52:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242879AbiDRN2q (ORCPT ); Mon, 18 Apr 2022 09:28:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3E8E3ED12; Mon, 18 Apr 2022 05:53:23 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 7F3386124E; Mon, 18 Apr 2022 12:53:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58382C385A1; Mon, 18 Apr 2022 12:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286401; bh=L+U2PjbOPSfXSjNB64PGA1oFCZtfSLRYyyvwrXR+O0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sl9FkzPmvdhNgVWVvJW0vPSLdvHze3qDY2HoNUNTnowqMQLbKIgklZnfpgPbkVNkA TK13yAudBJWRHBrUjeVXeEkLXi67F3CRWmOe+5jl6qmukn3G4HEYZRHRZIh74MVad6 vqfdzPPubl1TeDELI1WKuBkf/8r38/jMnB7sIhpc= 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 4.14 121/284] vxcan: enable local echo for sent CAN frames Date: Mon, 18 Apr 2022 14:11:42 +0200 Message-Id: <20220418121214.565347809@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 fc9197f14a3f..4b5355226f58 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -156,7 +156,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