From patchwork Wed May 20 08:50:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Fedorenko X-Patchwork-Id: 218929 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,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 584B1C433E0 for ; Wed, 20 May 2020 08:50:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2753E2075F for ; Wed, 20 May 2020 08:50:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=novek.ru header.i=@novek.ru header.b="vtPsXrcV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726823AbgETIu5 (ORCPT ); Wed, 20 May 2020 04:50:57 -0400 Received: from novek.ru ([213.148.174.62]:52512 "EHLO novek.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbgETIu5 (ORCPT ); Wed, 20 May 2020 04:50:57 -0400 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 987D5502966; Wed, 20 May 2020 11:50:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 novek.ru 987D5502966 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=novek.ru; s=mail; t=1589964653; bh=mRPZeBU0KCrXOT6Paa9QbaCLs5ELHEOoIttm/UBgtZI=; h=From:To:Cc:Subject:Date:From; b=vtPsXrcVWBOLlTXlFsiaRxKCyHVI6mFgh6hSbL7kauuKdDOCzDHFzPA3KIL2+KhPY F6/yuzzt9vqKa/xtZTc9FwecOkBzrCDGxEqvZVo78yu6BqFibDFPbqsVKpAYXNak6r Q2qFxUMG8O+91wcLCe9NZGXgnRrC3uZ2KsV6Zvuw= From: Vadim Fedorenko To: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI Cc: Jakub Kicinski , netdev@vger.kernel.org, Vadim Fedorenko Subject: [net] net: ipip: fix wrong address family in init error path Date: Wed, 20 May 2020 11:50:48 +0300 Message-Id: <1589964648-12516-1-git-send-email-vfedorenko@novek.ru> X-Mailer: git-send-email 1.8.3.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In case of error with MPLS support the code is misusing AF_INET instead of AF_MPLS. Fixes: 1b69e7e6c4da ("ipip: support MPLS over IPv4") Signed-off-by: Vadim Fedorenko --- net/ipv4/ipip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 2f01cf6..678575a 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -698,7 +698,7 @@ static int __init ipip_init(void) rtnl_link_failed: #if IS_ENABLED(CONFIG_MPLS) - xfrm4_tunnel_deregister(&mplsip_handler, AF_INET); + xfrm4_tunnel_deregister(&mplsip_handler, AF_MPLS); xfrm_tunnel_mplsip_failed: #endif