tcp md5sig: Share most of hash calcucaltion bits between IPv4 and IPv6.
We can share most part of the hash calculation code because the only difference between IPv4 and IPv6 is their pseudo headers. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
This commit is contained in:
@@ -1117,6 +1117,13 @@ struct tcp_md5sig_pool {
|
||||
#define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */
|
||||
|
||||
/* - functions */
|
||||
extern int tcp_calc_md5_hash(char *md5_hash,
|
||||
struct tcp_md5sig_key *key,
|
||||
int bplen,
|
||||
struct tcphdr *th,
|
||||
unsigned int tcplen,
|
||||
struct tcp_md5sig_pool *hp);
|
||||
|
||||
extern int tcp_v4_calc_md5_hash(char *md5_hash,
|
||||
struct tcp_md5sig_key *key,
|
||||
struct sock *sk,
|
||||
|
Reference in New Issue
Block a user