diff mbox series

[net] net: ipip: fix wrong address family in init error path

Message ID 1589964648-12516-1-git-send-email-vfedorenko@novek.ru
State Accepted
Delegated to: David Miller
Headers show
Series [net] net: ipip: fix wrong address family in init error path | expand

Commit Message

Vadim Fedorenko May 20, 2020, 8:50 a.m. UTC
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 <vfedorenko@novek.ru>
---
 net/ipv4/ipip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller May 22, 2020, 12:25 a.m. UTC | #1
From: Vadim Fedorenko <vfedorenko@novek.ru>
Date: Wed, 20 May 2020 11:50:48 +0300

> 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 <vfedorenko@novek.ru>

Applied and queued up for -stable, thanks.
diff mbox series

Patch

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