aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorHuw Davies <huw@codeweavers.com>2016-06-27 15:05:28 -0400
committerPaul Moore <paul@paul-moore.com>2016-06-27 15:05:28 -0400
commit56ac42bc94b18d45b6c484edeac33be86bfb3efa (patch)
treed14e433bcc0b3fef9349a86cbb6d8d87dedfb232 /net/ipv4/tcp_input.c
parent1f440c99d3207d684a3ac48d6e528af548b5c915 (diff)
ipv6: Allow request socks to contain IPv6 options.
If set, these will take precedence over the parent's options during both sending and child creation. If they're not set, the parent's options (if any) will be used. This is to allow the security_inet_conn_request() hook to modify the IPv6 options in just the same way that it already may do for IPv4. Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e6e65f79ade8..071174c13bf9 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -6146,6 +6146,9 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
6146 6146
6147 kmemcheck_annotate_bitfield(ireq, flags); 6147 kmemcheck_annotate_bitfield(ireq, flags);
6148 ireq->opt = NULL; 6148 ireq->opt = NULL;
6149#if IS_ENABLED(CONFIG_IPV6)
6150 ireq->pktopts = NULL;
6151#endif
6149 atomic64_set(&ireq->ir_cookie, 0); 6152 atomic64_set(&ireq->ir_cookie, 0);
6150 ireq->ireq_state = TCP_NEW_SYN_RECV; 6153 ireq->ireq_state = TCP_NEW_SYN_RECV;
6151 write_pnet(&ireq->ireq_net, sock_net(sk_listener)); 6154 write_pnet(&ireq->ireq_net, sock_net(sk_listener));