aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 6884a95be433..635206e8987e 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2066,10 +2066,6 @@ static const struct inet6_protocol tcpv6_protocol = {
2066 .early_demux = tcp_v6_early_demux, 2066 .early_demux = tcp_v6_early_demux,
2067 .handler = tcp_v6_rcv, 2067 .handler = tcp_v6_rcv,
2068 .err_handler = tcp_v6_err, 2068 .err_handler = tcp_v6_err,
2069 .gso_send_check = tcp_v6_gso_send_check,
2070 .gso_segment = tcp_tso_segment,
2071 .gro_receive = tcp6_gro_receive,
2072 .gro_complete = tcp6_gro_complete,
2073 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, 2069 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
2074}; 2070};
2075 2071
@@ -2116,10 +2112,14 @@ int __init tcpv6_init(void)
2116{ 2112{
2117 int ret; 2113 int ret;
2118 2114
2119 ret = inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP); 2115 ret = inet6_add_offload(&tcpv6_offload, IPPROTO_TCP);
2120 if (ret) 2116 if (ret)
2121 goto out; 2117 goto out;
2122 2118
2119 ret = inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP);
2120 if (ret)
2121 goto out_offload;
2122
2123 /* register inet6 protocol */ 2123 /* register inet6 protocol */
2124 ret = inet6_register_protosw(&tcpv6_protosw); 2124 ret = inet6_register_protosw(&tcpv6_protosw);
2125 if (ret) 2125 if (ret)
@@ -2131,10 +2131,12 @@ int __init tcpv6_init(void)
2131out: 2131out:
2132 return ret; 2132 return ret;
2133 2133
2134out_tcpv6_protocol:
2135 inet6_del_protocol(&tcpv6_protocol, IPPROTO_TCP);
2136out_tcpv6_protosw: 2134out_tcpv6_protosw:
2137 inet6_unregister_protosw(&tcpv6_protosw); 2135 inet6_unregister_protosw(&tcpv6_protosw);
2136out_tcpv6_protocol:
2137 inet6_del_protocol(&tcpv6_protocol, IPPROTO_TCP);
2138out_offload:
2139 inet6_del_offload(&tcpv6_offload, IPPROTO_TCP);
2138 goto out; 2140 goto out;
2139} 2141}
2140 2142
@@ -2143,4 +2145,5 @@ void tcpv6_exit(void)
2143 unregister_pernet_subsys(&tcpv6_net_ops); 2145 unregister_pernet_subsys(&tcpv6_net_ops);
2144 inet6_unregister_protosw(&tcpv6_protosw); 2146 inet6_unregister_protosw(&tcpv6_protosw);
2145 inet6_del_protocol(&tcpv6_protocol, IPPROTO_TCP); 2147 inet6_del_protocol(&tcpv6_protocol, IPPROTO_TCP);
2148 inet6_del_offload(&tcpv6_offload, IPPROTO_TCP);
2146} 2149}