aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 552e87e3c269..94d1a7757ff7 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -880,26 +880,6 @@ bool tcp_syn_flood_action(struct sock *sk,
880} 880}
881EXPORT_SYMBOL(tcp_syn_flood_action); 881EXPORT_SYMBOL(tcp_syn_flood_action);
882 882
883/*
884 * Save and compile IPv4 options into the request_sock if needed.
885 */
886static struct ip_options_rcu *tcp_v4_save_options(struct sk_buff *skb)
887{
888 const struct ip_options *opt = &TCP_SKB_CB(skb)->header.h4.opt;
889 struct ip_options_rcu *dopt = NULL;
890
891 if (opt && opt->optlen) {
892 int opt_size = sizeof(*dopt) + opt->optlen;
893
894 dopt = kmalloc(opt_size, GFP_ATOMIC);
895 if (dopt && __ip_options_echo(&dopt->opt, skb, opt)) {
896 kfree(dopt);
897 dopt = NULL;
898 }
899 }
900 return dopt;
901}
902
903#ifdef CONFIG_TCP_MD5SIG 883#ifdef CONFIG_TCP_MD5SIG
904/* 884/*
905 * RFC2385 MD5 checksumming requires a mapping of 885 * RFC2385 MD5 checksumming requires a mapping of
@@ -1428,7 +1408,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb)
1428 1408
1429#ifdef CONFIG_SYN_COOKIES 1409#ifdef CONFIG_SYN_COOKIES
1430 if (!th->syn) 1410 if (!th->syn)
1431 sk = cookie_v4_check(sk, skb, &TCP_SKB_CB(skb)->header.h4.opt); 1411 sk = cookie_v4_check(sk, skb);
1432#endif 1412#endif
1433 return sk; 1413 return sk;
1434} 1414}