linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vti4: ipip tunnel deregistration fixes.
@ 2019-03-14 16:13 Jeremy Sowden
  2019-03-15 18:54 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Sowden @ 2019-03-14 16:13 UTC (permalink / raw)
  To: netdev, linux-kernel

If tunnel registration failed during module initialization, the module
would fail to deregister the IPPROTO_COMP protocol and would attempt to
deregister the tunnel.

The tunnel was not deregistered during module-exit.

Fixes: d9ee3444014e ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 net/ipv4/ip_vti.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 68a21bf75dd0..b6235ca09fa5 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -659,9 +659,9 @@ static int __init vti_init(void)
 	return err;
 
 rtnl_link_failed:
-	xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
-xfrm_tunnel_failed:
 	xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
+xfrm_tunnel_failed:
+	xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
 xfrm_proto_comp_failed:
 	xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
 xfrm_proto_ah_failed:
@@ -676,6 +676,7 @@ static int __init vti_init(void)
 static void __exit vti_fini(void)
 {
 	rtnl_link_unregister(&vti_link_ops);
+	xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
 	xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
 	xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
 	xfrm4_protocol_deregister(&vti_esp4_protocol, IPPROTO_ESP);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vti4: ipip tunnel deregistration fixes.
  2019-03-14 16:13 [PATCH] vti4: ipip tunnel deregistration fixes Jeremy Sowden
@ 2019-03-15 18:54 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-03-15 18:54 UTC (permalink / raw)
  To: jeremy; +Cc: netdev, linux-kernel

From: Jeremy Sowden <jeremy@azazel.net>
Date: Thu, 14 Mar 2019 16:13:33 +0000

> If tunnel registration failed during module initialization, the module
> would fail to deregister the IPPROTO_COMP protocol and would attempt to
> deregister the tunnel.
> 
> The tunnel was not deregistered during module-exit.
> 
> Fixes: d9ee3444014e ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel")
> Signed-off-by: Jeremy Sowden <jeremy@azazel.net>

Please resubmit and properly CC: the IPSEC maintainer (as per
MAINTAINERS) on all of your vti changes.

Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-15 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 16:13 [PATCH] vti4: ipip tunnel deregistration fixes Jeremy Sowden
2019-03-15 18:54 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).