From patchwork Fri Feb 12 10:48:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Fedorenko X-Patchwork-Id: 12085009 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C88F1C433DB for ; Fri, 12 Feb 2021 10:49:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 874D564DCD for ; Fri, 12 Feb 2021 10:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230363AbhBLKtK (ORCPT ); Fri, 12 Feb 2021 05:49:10 -0500 Received: from novek.ru ([213.148.174.62]:53156 "EHLO novek.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbhBLKtJ (ORCPT ); Fri, 12 Feb 2021 05:49:09 -0500 Received: from nat1.ooonet.ru (gw.zelenaya.net [91.207.137.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by novek.ru (Postfix) with ESMTPSA id F084850347E; Fri, 12 Feb 2021 13:48:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 novek.ru F084850347E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=novek.ru; s=mail; t=1613126914; bh=UmooAoTLFq/e1rDfyAY0Whvf6lra9MMk5KbqArNk1Ew=; h=From:To:Cc:Subject:Date:From; b=ZNKMyoLuawM3ccK8cDvjN78O9hDK1cphjqE0F/Ei2OqBySlBgTmKnttMABaS7QQeI 3qLjinZz0mZeV+p7sSMYfai1KD3f1Mz0N4CE6z+1wZ6VnrV85KfA82kgigM4he3mgo VoGW4TFXAA4lSC6q2mP23WJW7dL9xVIfZzzExP2A= From: Vadim Fedorenko To: Jakub Kicinski , David Howells , Willem de Bruijn , "David S . Miller" Cc: Vadim Fedorenko , netdev@vger.kernel.org Subject: [RESEND net-next] rxrpc: Fix dependency on IPv6 in udp tunnel config Date: Fri, 12 Feb 2021 13:48:14 +0300 Message-Id: <20210212104814.21452-1-vfedorenko@novek.ru> X-Mailer: git-send-email 2.18.4 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org As udp_port_cfg struct changes its members with dependency on IPv6 configuration, the code in rxrpc should also check for IPv6. Fixes: 1a9b86c9fd95 ("rxrpc: use udp tunnel APIs instead of open code in rxrpc_open_socket") Reported-by: kernel test robot Signed-off-by: Vadim Fedorenko Acked-by: David Howells --- net/rxrpc/local_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index 546fd237a649..a4111408ffd0 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -120,9 +120,11 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net) if (udp_conf.family == AF_INET) { udp_conf.local_ip = srx->transport.sin.sin_addr; udp_conf.local_udp_port = srx->transport.sin.sin_port; +#if IS_ENABLED(CONFIG_AF_RXRPC_IPV6) } else { udp_conf.local_ip6 = srx->transport.sin6.sin6_addr; udp_conf.local_udp_port = srx->transport.sin6.sin6_port; +#endif } ret = udp_sock_create(net, &udp_conf, &local->socket); if (ret < 0) {