From: Al Viro Date: Thu, 28 Sep 2006 01:27:47 +0000 (-0700) Subject: [IPV4]: inet_csk_search_req() (partial) annotations X-Git-Tag: v2.6.19-rc1~858^2~84 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f25afbbefb266520a237df0e9b59112704a7a42;p=linux-2.6 [IPV4]: inet_csk_search_req() (partial) annotations raddr is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index de4e83b6da..8122bcc83c 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -239,8 +239,8 @@ extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); extern struct request_sock *inet_csk_search_req(const struct sock *sk, struct request_sock ***prevp, const __u16 rport, - const __u32 raddr, - const __u32 laddr); + const __be32 raddr, + const __be32 laddr); extern int inet_csk_bind_conflict(const struct sock *sk, const struct inet_bind_bucket *tb); extern int inet_csk_get_port(struct inet_hashinfo *hashinfo, diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 07204391d0..b9f4b7d572 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -342,10 +342,10 @@ struct dst_entry* inet_csk_route_req(struct sock *sk, EXPORT_SYMBOL_GPL(inet_csk_route_req); -static inline u32 inet_synq_hash(const u32 raddr, const u16 rport, +static inline u32 inet_synq_hash(const __be32 raddr, const u16 rport, const u32 rnd, const u16 synq_hsize) { - return jhash_2words(raddr, (u32)rport, rnd) & (synq_hsize - 1); + return jhash_2words((__force u32)raddr, (u32)rport, rnd) & (synq_hsize - 1); } #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) @@ -356,8 +356,8 @@ static inline u32 inet_synq_hash(const u32 raddr, const u16 rport, struct request_sock *inet_csk_search_req(const struct sock *sk, struct request_sock ***prevp, - const __u16 rport, const __u32 raddr, - const __u32 laddr) + const __u16 rport, const __be32 raddr, + const __be32 laddr) { const struct inet_connection_sock *icsk = inet_csk(sk); struct listen_sock *lopt = icsk->icsk_accept_queue.listen_opt;