tcp: get_cookie_sock() consolidation
authorEric Dumazet <edumazet@google.com>
Fri, 5 Jun 2015 01:30:43 +0000 (18:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Jun 2015 22:19:52 +0000 (15:19 -0700)
IPv4 and IPv6 share same implementation of get_cookie_sock(),
and there is no point inlining it.

We add tcp_ prefix to the common helper name and export it.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/syncookies.c
net/ipv6/syncookies.c

index 2bb2bad..978cebe 100644 (file)
@@ -469,6 +469,9 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size);
 void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb);
 
 /* From syncookies.c */
+struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,
+                                struct request_sock *req,
+                                struct dst_entry *dst);
 int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th,
                      u32 cookie);
 struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb);
Simple merge
Simple merge