Commit a928630a authored by David S. Miller's avatar David S. Miller

[TCP]: Fix some warning when MD5 is disabled.

Just some mis-placed ifdefs:

net/ipv4/tcp_minisocks.c: In function ‘tcp_twsk_destructor’:
net/ipv4/tcp_minisocks.c:364: warning: unused variable ‘twsk’
net/ipv6/tcp_ipv6.c:1846: warning: ‘tcp_sock_ipv6_specific’ defined but not used
net/ipv6/tcp_ipv6.c:1877: warning: ‘tcp_sock_ipv6_mapped_specific’ defined but not used
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17c157c8
...@@ -361,8 +361,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) ...@@ -361,8 +361,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
void tcp_twsk_destructor(struct sock *sk) void tcp_twsk_destructor(struct sock *sk)
{ {
struct tcp_timewait_sock *twsk = tcp_twsk(sk);
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
struct tcp_timewait_sock *twsk = tcp_twsk(sk);
if (twsk->tw_md5_keylen) if (twsk->tw_md5_keylen)
tcp_put_md5sig_pool(); tcp_put_md5sig_pool();
#endif #endif
......
...@@ -81,8 +81,10 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb); ...@@ -81,8 +81,10 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb);
static struct inet_connection_sock_af_ops ipv6_mapped; static struct inet_connection_sock_af_ops ipv6_mapped;
static struct inet_connection_sock_af_ops ipv6_specific; static struct inet_connection_sock_af_ops ipv6_specific;
#ifdef CONFIG_TCP_MD5SIG
static struct tcp_sock_af_ops tcp_sock_ipv6_specific; static struct tcp_sock_af_ops tcp_sock_ipv6_specific;
static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific;
#endif
static int tcp_v6_get_port(struct sock *sk, unsigned short snum) static int tcp_v6_get_port(struct sock *sk, unsigned short snum)
{ {
...@@ -1843,14 +1845,14 @@ static struct inet_connection_sock_af_ops ipv6_specific = { ...@@ -1843,14 +1845,14 @@ static struct inet_connection_sock_af_ops ipv6_specific = {
#endif #endif
}; };
static struct tcp_sock_af_ops tcp_sock_ipv6_specific = {
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
static struct tcp_sock_af_ops tcp_sock_ipv6_specific = {
.md5_lookup = tcp_v6_md5_lookup, .md5_lookup = tcp_v6_md5_lookup,
.calc_md5_hash = tcp_v6_calc_md5_hash, .calc_md5_hash = tcp_v6_calc_md5_hash,
.md5_add = tcp_v6_md5_add_func, .md5_add = tcp_v6_md5_add_func,
.md5_parse = tcp_v6_parse_md5_keys, .md5_parse = tcp_v6_parse_md5_keys,
#endif
}; };
#endif
/* /*
* TCP over IPv4 via INET6 API * TCP over IPv4 via INET6 API
...@@ -1874,14 +1876,14 @@ static struct inet_connection_sock_af_ops ipv6_mapped = { ...@@ -1874,14 +1876,14 @@ static struct inet_connection_sock_af_ops ipv6_mapped = {
#endif #endif
}; };
static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = {
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = {
.md5_lookup = tcp_v4_md5_lookup, .md5_lookup = tcp_v4_md5_lookup,
.calc_md5_hash = tcp_v4_calc_md5_hash, .calc_md5_hash = tcp_v4_calc_md5_hash,
.md5_add = tcp_v6_md5_add_func, .md5_add = tcp_v6_md5_add_func,
.md5_parse = tcp_v6_parse_md5_keys, .md5_parse = tcp_v6_parse_md5_keys,
#endif
}; };
#endif
/* NOTE: A lot of things set to zero explicitly by call to /* NOTE: A lot of things set to zero explicitly by call to
* sk_alloc() so need not be done here. * sk_alloc() so need not be done here.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment