netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ipv6: fix exthdrs offload registration in out_rt path
@ 2015-09-02 22:29 Daniel Borkmann
  2015-09-02 22:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2015-09-02 22:29 UTC (permalink / raw)
  To: davem; +Cc: vyasevic, netdev, Daniel Borkmann

We previously register IPPROTO_ROUTING offload under inet6_add_offload(),
but in error path, we try to unregister it with inet_del_offload(). This
doesn't seem correct, it should actually be inet6_del_offload(), also
ipv6_exthdrs_offload_exit() from that commit seems rather incorrect (it
also uses rthdr_offload twice), but it got removed entirely later on.

Fixes: 3336288a9fea ("ipv6: Switch to using new offload infrastructure.")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
 (Found during code review.)

 net/ipv6/exthdrs_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/exthdrs_offload.c b/net/ipv6/exthdrs_offload.c
index 447a7fb..f5e2ba1 100644
--- a/net/ipv6/exthdrs_offload.c
+++ b/net/ipv6/exthdrs_offload.c
@@ -36,6 +36,6 @@ out:
 	return ret;
 
 out_rt:
-	inet_del_offload(&rthdr_offload, IPPROTO_ROUTING);
+	inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
 	goto out;
 }
-- 
1.9.3

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

* Re: [PATCH net] ipv6: fix exthdrs offload registration in out_rt path
  2015-09-02 22:29 [PATCH net] ipv6: fix exthdrs offload registration in out_rt path Daniel Borkmann
@ 2015-09-02 22:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-09-02 22:31 UTC (permalink / raw)
  To: daniel; +Cc: vyasevic, netdev

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Thu,  3 Sep 2015 00:29:07 +0200

> We previously register IPPROTO_ROUTING offload under inet6_add_offload(),
> but in error path, we try to unregister it with inet_del_offload(). This
> doesn't seem correct, it should actually be inet6_del_offload(), also
> ipv6_exthdrs_offload_exit() from that commit seems rather incorrect (it
> also uses rthdr_offload twice), but it got removed entirely later on.
> 
> Fixes: 3336288a9fea ("ipv6: Switch to using new offload infrastructure.")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

Applied and queued up for -stable, thanks Daniel.

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

end of thread, other threads:[~2015-09-02 22:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 22:29 [PATCH net] ipv6: fix exthdrs offload registration in out_rt path Daniel Borkmann
2015-09-02 22:31 ` 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).