aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-04-17 23:45:16 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-06-11 14:46:30 -0400
commit9501f9722922f2e80e1f9dc6682311d65c2b5690 (patch)
treeca8195e04ea63e8273801030ce26527fe5a8a7c7 /include/net/tcp.h
parent8d26d76dd4a4c87ef037a44a42a0608ffc730199 (diff)
tcp md5sig: Let the caller pass appropriate key for tcp_v{4,6}_do_calc_md5_hash().
As we do for other socket/timewait-socket specific parameters, let the callers pass appropriate arguments to tcp_v{4,6}_do_calc_md5_hash(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index eac26b73bcc3..07005ebb47a7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1142,6 +1142,16 @@ extern int tcp_v4_md5_do_add(struct sock *sk,
1142extern int tcp_v4_md5_do_del(struct sock *sk, 1142extern int tcp_v4_md5_do_del(struct sock *sk,
1143 __be32 addr); 1143 __be32 addr);
1144 1144
1145#ifdef CONFIG_TCP_MD5SIG
1146#define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_keylen ? \
1147 &(struct tcp_md5sig_key) { \
1148 .key = (twsk)->tw_md5_key, \
1149 .keylen = (twsk)->tw_md5_keylen, \
1150 } : NULL)
1151#else
1152#define tcp_twsk_md5_key(twsk) NULL
1153#endif
1154
1145extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); 1155extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void);
1146extern void tcp_free_md5sig_pool(void); 1156extern void tcp_free_md5sig_pool(void);
1147 1157