diff options
author | Cong Wang <cwang@twopensource.com> | 2014-10-15 17:33:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-17 12:02:57 -0400 |
commit | 461b74c391c4ec9c766794e158508c357d8952e6 (patch) | |
tree | 19cfb1a79b6dc5c9141022985c3917fc2d90b7a1 /net/ipv4/tcp_ipv4.c | |
parent | e25f866fbc8a4bf387b5dbe8e25aa5b07e55c74f (diff) |
ipv4: clean up cookie_v4_check()
We can retrieve opt from skb, no need to pass it as a parameter.
And opt should always be non-NULL, no need to check.
Cc: Krzysztof Kolasa <kkolasa@winsoft.pl>
Cc: Eric Dumazet <edumazet@google.com>
Tested-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 6a2a7d659a7a..94d1a7757ff7 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1408,7 +1408,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
1408 | 1408 | ||
1409 | #ifdef CONFIG_SYN_COOKIES | 1409 | #ifdef CONFIG_SYN_COOKIES |
1410 | if (!th->syn) | 1410 | if (!th->syn) |
1411 | sk = cookie_v4_check(sk, skb, &TCP_SKB_CB(skb)->header.h4.opt); | 1411 | sk = cookie_v4_check(sk, skb); |
1412 | #endif | 1412 | #endif |
1413 | return sk; | 1413 | return sk; |
1414 | } | 1414 | } |