Commit 8d14167cc854117c94f02f5ba612689869b3d9a4

Authored by Daniel Borkmann
Committed by Greg Kroah-Hartman
1 parent 6a7ca4e157

ipv6: fix exthdrs offload registration in out_rt path

[ Upstream commit e41b0bedba0293b9e1e8d1e8ed553104b9693656 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/ipv6/exthdrs_offload.c
... ... @@ -36,7 +36,7 @@
36 36 return ret;
37 37  
38 38 out_rt:
39   - inet_del_offload(&rthdr_offload, IPPROTO_ROUTING);
  39 + inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
40 40 goto out;
41 41 }