diff options
author | Eric Dumazet <edumazet@google.com> | 2015-09-25 10:39:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-25 16:00:38 -0400 |
commit | b83e3deb974ca2c11e21256fe602e517afb83247 (patch) | |
tree | d3c7dd5c5a8ee476564b5d2d34deda2b95ff5f9d /include/net/tcp.h | |
parent | 4e3f5d727d60939c890a6e86944da52b3a1625ce (diff) |
tcp: md5: constify tcp_md5_do_lookup() socket argument
When TCP new listener is done, these functions will be called
without socket lock being held. Make sure they don't change
anything.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index d37ad0c3ea9c..45bc3c63c3fd 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1372,16 +1372,16 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr, | |||
1372 | int family, const u8 *newkey, u8 newkeylen, gfp_t gfp); | 1372 | int family, const u8 *newkey, u8 newkeylen, gfp_t gfp); |
1373 | int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, | 1373 | int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, |
1374 | int family); | 1374 | int family); |
1375 | struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, | 1375 | struct tcp_md5sig_key *tcp_v4_md5_lookup(const struct sock *sk, |
1376 | const struct sock *addr_sk); | 1376 | const struct sock *addr_sk); |
1377 | 1377 | ||
1378 | #ifdef CONFIG_TCP_MD5SIG | 1378 | #ifdef CONFIG_TCP_MD5SIG |
1379 | struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk, | 1379 | struct tcp_md5sig_key *tcp_md5_do_lookup(const struct sock *sk, |
1380 | const union tcp_md5_addr *addr, | 1380 | const union tcp_md5_addr *addr, |
1381 | int family); | 1381 | int family); |
1382 | #define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_key) | 1382 | #define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_key) |
1383 | #else | 1383 | #else |
1384 | static inline struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk, | 1384 | static inline struct tcp_md5sig_key *tcp_md5_do_lookup(const struct sock *sk, |
1385 | const union tcp_md5_addr *addr, | 1385 | const union tcp_md5_addr *addr, |
1386 | int family) | 1386 | int family) |
1387 | { | 1387 | { |
@@ -1684,7 +1684,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops, | |||
1684 | /* TCP af-specific functions */ | 1684 | /* TCP af-specific functions */ |
1685 | struct tcp_sock_af_ops { | 1685 | struct tcp_sock_af_ops { |
1686 | #ifdef CONFIG_TCP_MD5SIG | 1686 | #ifdef CONFIG_TCP_MD5SIG |
1687 | struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, | 1687 | struct tcp_md5sig_key *(*md5_lookup) (const struct sock *sk, |
1688 | const struct sock *addr_sk); | 1688 | const struct sock *addr_sk); |
1689 | int (*calc_md5_hash)(char *location, | 1689 | int (*calc_md5_hash)(char *location, |
1690 | const struct tcp_md5sig_key *md5, | 1690 | const struct tcp_md5sig_key *md5, |
@@ -1699,7 +1699,7 @@ struct tcp_sock_af_ops { | |||
1699 | struct tcp_request_sock_ops { | 1699 | struct tcp_request_sock_ops { |
1700 | u16 mss_clamp; | 1700 | u16 mss_clamp; |
1701 | #ifdef CONFIG_TCP_MD5SIG | 1701 | #ifdef CONFIG_TCP_MD5SIG |
1702 | struct tcp_md5sig_key *(*req_md5_lookup)(struct sock *sk, | 1702 | struct tcp_md5sig_key *(*req_md5_lookup)(const struct sock *sk, |
1703 | const struct sock *addr_sk); | 1703 | const struct sock *addr_sk); |
1704 | int (*calc_md5_hash) (char *location, | 1704 | int (*calc_md5_hash) (char *location, |
1705 | const struct tcp_md5sig_key *md5, | 1705 | const struct tcp_md5sig_key *md5, |