diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-11-14 22:53:22 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:43 -0500 |
commit | a928630a2ffeaf6aa9a6b78456935b6ab1be3066 (patch) | |
tree | 0be1f64ffb8234485cfbfb78c958f47962286fea | |
parent | 17c157c889f4b07258af6bfec9e4e9dcf3c00178 (diff) |
[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: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index ac55d8892cf1..4a0ee901a888 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -361,8 +361,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) | |||
361 | 361 | ||
362 | void tcp_twsk_destructor(struct sock *sk) | 362 | void tcp_twsk_destructor(struct sock *sk) |
363 | { | 363 | { |
364 | struct tcp_timewait_sock *twsk = tcp_twsk(sk); | ||
365 | #ifdef CONFIG_TCP_MD5SIG | 364 | #ifdef CONFIG_TCP_MD5SIG |
365 | struct tcp_timewait_sock *twsk = tcp_twsk(sk); | ||
366 | if (twsk->tw_md5_keylen) | 366 | if (twsk->tw_md5_keylen) |
367 | tcp_put_md5sig_pool(); | 367 | tcp_put_md5sig_pool(); |
368 | #endif | 368 | #endif |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 663d1d238014..edef7eef8341 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -81,8 +81,10 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb); | |||
81 | 81 | ||
82 | static struct inet_connection_sock_af_ops ipv6_mapped; | 82 | static struct inet_connection_sock_af_ops ipv6_mapped; |
83 | static struct inet_connection_sock_af_ops ipv6_specific; | 83 | static struct inet_connection_sock_af_ops ipv6_specific; |
84 | #ifdef CONFIG_TCP_MD5SIG | ||
84 | static struct tcp_sock_af_ops tcp_sock_ipv6_specific; | 85 | static struct tcp_sock_af_ops tcp_sock_ipv6_specific; |
85 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; | 86 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; |
87 | #endif | ||
86 | 88 | ||
87 | static int tcp_v6_get_port(struct sock *sk, unsigned short snum) | 89 | static int tcp_v6_get_port(struct sock *sk, unsigned short snum) |
88 | { | 90 | { |
@@ -1843,14 +1845,14 @@ static struct inet_connection_sock_af_ops ipv6_specific = { | |||
1843 | #endif | 1845 | #endif |
1844 | }; | 1846 | }; |
1845 | 1847 | ||
1846 | static struct tcp_sock_af_ops tcp_sock_ipv6_specific = { | ||
1847 | #ifdef CONFIG_TCP_MD5SIG | 1848 | #ifdef CONFIG_TCP_MD5SIG |
1849 | static struct tcp_sock_af_ops tcp_sock_ipv6_specific = { | ||
1848 | .md5_lookup = tcp_v6_md5_lookup, | 1850 | .md5_lookup = tcp_v6_md5_lookup, |
1849 | .calc_md5_hash = tcp_v6_calc_md5_hash, | 1851 | .calc_md5_hash = tcp_v6_calc_md5_hash, |
1850 | .md5_add = tcp_v6_md5_add_func, | 1852 | .md5_add = tcp_v6_md5_add_func, |
1851 | .md5_parse = tcp_v6_parse_md5_keys, | 1853 | .md5_parse = tcp_v6_parse_md5_keys, |
1852 | #endif | ||
1853 | }; | 1854 | }; |
1855 | #endif | ||
1854 | 1856 | ||
1855 | /* | 1857 | /* |
1856 | * TCP over IPv4 via INET6 API | 1858 | * TCP over IPv4 via INET6 API |
@@ -1874,14 +1876,14 @@ static struct inet_connection_sock_af_ops ipv6_mapped = { | |||
1874 | #endif | 1876 | #endif |
1875 | }; | 1877 | }; |
1876 | 1878 | ||
1877 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { | ||
1878 | #ifdef CONFIG_TCP_MD5SIG | 1879 | #ifdef CONFIG_TCP_MD5SIG |
1880 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { | ||
1879 | .md5_lookup = tcp_v4_md5_lookup, | 1881 | .md5_lookup = tcp_v4_md5_lookup, |
1880 | .calc_md5_hash = tcp_v4_calc_md5_hash, | 1882 | .calc_md5_hash = tcp_v4_calc_md5_hash, |
1881 | .md5_add = tcp_v6_md5_add_func, | 1883 | .md5_add = tcp_v6_md5_add_func, |
1882 | .md5_parse = tcp_v6_parse_md5_keys, | 1884 | .md5_parse = tcp_v6_parse_md5_keys, |
1883 | #endif | ||
1884 | }; | 1885 | }; |
1886 | #endif | ||
1885 | 1887 | ||
1886 | /* NOTE: A lot of things set to zero explicitly by call to | 1888 | /* NOTE: A lot of things set to zero explicitly by call to |
1887 | * sk_alloc() so need not be done here. | 1889 | * sk_alloc() so need not be done here. |