* [PATCH net v2 0/2] vti4: ipip tunnel fixes
@ 2019-03-16 8:43 Jeremy Sowden
2019-03-16 8:43 ` [PATCH net v2 1/2] vti4: ipip tunnel deregistration fixes Jeremy Sowden
2019-03-16 8:43 ` [PATCH net v2 2/2] vti4: removed duplicate log message Jeremy Sowden
0 siblings, 2 replies; 4+ messages in thread
From: Jeremy Sowden @ 2019-03-16 8:43 UTC (permalink / raw)
To: netdev; +Cc: Steffen Klassert, Herbert Xu, David S. Miller
Some fixes for the initialization and clean-up of the ipip tunnel.
Jeremy Sowden (2):
vti4: ipip tunnel deregistration fixes.
vti4: removed duplicate log message.
Since v1:
* submitted both patches as one set.
* cc'ed the IPSec maintainers.
net/ipv4/ip_vti.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net v2 1/2] vti4: ipip tunnel deregistration fixes.
2019-03-16 8:43 [PATCH net v2 0/2] vti4: ipip tunnel fixes Jeremy Sowden
@ 2019-03-16 8:43 ` Jeremy Sowden
2019-03-19 15:19 ` Steffen Klassert
2019-03-16 8:43 ` [PATCH net v2 2/2] vti4: removed duplicate log message Jeremy Sowden
1 sibling, 1 reply; 4+ messages in thread
From: Jeremy Sowden @ 2019-03-16 8:43 UTC (permalink / raw)
To: netdev; +Cc: Steffen Klassert, Herbert Xu, David S. Miller
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] 4+ messages in thread
* [PATCH net v2 2/2] vti4: removed duplicate log message.
2019-03-16 8:43 [PATCH net v2 0/2] vti4: ipip tunnel fixes Jeremy Sowden
2019-03-16 8:43 ` [PATCH net v2 1/2] vti4: ipip tunnel deregistration fixes Jeremy Sowden
@ 2019-03-16 8:43 ` Jeremy Sowden
1 sibling, 0 replies; 4+ messages in thread
From: Jeremy Sowden @ 2019-03-16 8:43 UTC (permalink / raw)
To: netdev; +Cc: Steffen Klassert, Herbert Xu, David S. Miller
Removed info log-message if ipip tunnel registration fails during
module-initialization: it adds nothing to the error message that is
written on all failures.
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 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index b6235ca09fa5..35d8346742e2 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -646,10 +646,8 @@ static int __init vti_init(void)
msg = "ipip tunnel";
err = xfrm4_tunnel_register(&ipip_handler, AF_INET);
- if (err < 0) {
- pr_info("%s: cant't register tunnel\n",__func__);
+ if (err < 0)
goto xfrm_tunnel_failed;
- }
msg = "netlink interface";
err = rtnl_link_register(&vti_link_ops);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2 1/2] vti4: ipip tunnel deregistration fixes.
2019-03-16 8:43 ` [PATCH net v2 1/2] vti4: ipip tunnel deregistration fixes Jeremy Sowden
@ 2019-03-19 15:19 ` Steffen Klassert
0 siblings, 0 replies; 4+ messages in thread
From: Steffen Klassert @ 2019-03-19 15:19 UTC (permalink / raw)
To: Jeremy Sowden; +Cc: netdev, Herbert Xu, David S. Miller
On Sat, Mar 16, 2019 at 08:43:28AM +0000, Jeremy Sowden wrote:
> 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")
d9ee3444014e is not a valid commit id, please fix this.
Also, please Cc the original author of that patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-19 15:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-16 8:43 [PATCH net v2 0/2] vti4: ipip tunnel fixes Jeremy Sowden
2019-03-16 8:43 ` [PATCH net v2 1/2] vti4: ipip tunnel deregistration fixes Jeremy Sowden
2019-03-19 15:19 ` Steffen Klassert
2019-03-16 8:43 ` [PATCH net v2 2/2] vti4: removed duplicate log message Jeremy Sowden
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).