mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
net: Eliminate no_check from protosw
It doesn't seem like an protocols are setting anything other than the default, and allowing to arbitrarily disable checksums for a whole protocol seems dangerous. This can be done on a per socket basis. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
0f8066bd48
commit
b26ba202e0
14 changed files with 0 additions and 24 deletions
|
|
@ -106,7 +106,6 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol,
|
|||
struct inet_protosw *answer;
|
||||
struct proto *answer_prot;
|
||||
unsigned char answer_flags;
|
||||
char answer_no_check;
|
||||
int try_loading_module = 0;
|
||||
int err;
|
||||
|
||||
|
|
@ -162,7 +161,6 @@ lookup_protocol:
|
|||
|
||||
sock->ops = answer->ops;
|
||||
answer_prot = answer->prot;
|
||||
answer_no_check = answer->no_check;
|
||||
answer_flags = answer->flags;
|
||||
rcu_read_unlock();
|
||||
|
||||
|
|
@ -176,7 +174,6 @@ lookup_protocol:
|
|||
sock_init_data(sock, sk);
|
||||
|
||||
err = 0;
|
||||
sk->sk_no_check = answer_no_check;
|
||||
if (INET_PROTOSW_REUSE & answer_flags)
|
||||
sk->sk_reuse = SK_CAN_REUSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ static struct inet_protosw pingv6_protosw = {
|
|||
.protocol = IPPROTO_ICMPV6,
|
||||
.prot = &pingv6_prot,
|
||||
.ops = &inet6_dgram_ops,
|
||||
.no_check = UDP_CSUM_DEFAULT,
|
||||
.flags = INET_PROTOSW_REUSE,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1322,7 +1322,6 @@ static struct inet_protosw rawv6_protosw = {
|
|||
.protocol = IPPROTO_IP, /* wild card */
|
||||
.prot = &rawv6_prot,
|
||||
.ops = &inet6_sockraw_ops,
|
||||
.no_check = UDP_CSUM_DEFAULT,
|
||||
.flags = INET_PROTOSW_REUSE,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1992,7 +1992,6 @@ static struct inet_protosw tcpv6_protosw = {
|
|||
.protocol = IPPROTO_TCP,
|
||||
.prot = &tcpv6_prot,
|
||||
.ops = &inet6_stream_ops,
|
||||
.no_check = 0,
|
||||
.flags = INET_PROTOSW_PERMANENT |
|
||||
INET_PROTOSW_ICSK,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1507,7 +1507,6 @@ static struct inet_protosw udpv6_protosw = {
|
|||
.protocol = IPPROTO_UDP,
|
||||
.prot = &udpv6_prot,
|
||||
.ops = &inet6_dgram_ops,
|
||||
.no_check = UDP_CSUM_DEFAULT,
|
||||
.flags = INET_PROTOSW_PERMANENT,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ static struct inet_protosw udplite6_protosw = {
|
|||
.protocol = IPPROTO_UDPLITE,
|
||||
.prot = &udplitev6_prot,
|
||||
.ops = &inet6_dgram_ops,
|
||||
.no_check = 0,
|
||||
.flags = INET_PROTOSW_PERMANENT,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue