Skip to content

Commit 7f25afb

Browse files
Al ViroDavid S. Miller
authored andcommitted
[IPV4]: inet_csk_search_req() (partial) annotations
raddr is net-endian Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent adaf345 commit 7f25afb

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎include/net/inet_connection_sock.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err);
239239
extern struct request_sock *inet_csk_search_req(const struct sock *sk,
240240
struct request_sock ***prevp,
241241
const __u16 rport,
242-
const __u32 raddr,
243-
const __u32 laddr);
242+
const __be32 raddr,
243+
const __be32 laddr);
244244
extern int inet_csk_bind_conflict(const struct sock *sk,
245245
const struct inet_bind_bucket *tb);
246246
extern int inet_csk_get_port(struct inet_hashinfo *hashinfo,

‎net/ipv4/inet_connection_sock.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ struct dst_entry* inet_csk_route_req(struct sock *sk,
342342

343343
EXPORT_SYMBOL_GPL(inet_csk_route_req);
344344

345-
static inline u32 inet_synq_hash(const u32 raddr, const u16 rport,
345+
static inline u32 inet_synq_hash(const __be32 raddr, const u16 rport,
346346
const u32 rnd, const u16 synq_hsize)
347347
{
348-
return jhash_2words(raddr, (u32)rport, rnd) & (synq_hsize - 1);
348+
return jhash_2words((__force u32)raddr, (u32)rport, rnd) & (synq_hsize - 1);
349349
}
350350

351351
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -356,8 +356,8 @@ static inline u32 inet_synq_hash(const u32 raddr, const u16 rport,
356356

357357
struct request_sock *inet_csk_search_req(const struct sock *sk,
358358
struct request_sock ***prevp,
359-
const __u16 rport, const __u32 raddr,
360-
const __u32 laddr)
359+
const __u16 rport, const __be32 raddr,
360+
const __be32 laddr)
361361
{
362362
const struct inet_connection_sock *icsk = inet_csk(sk);
363363
struct listen_sock *lopt = icsk->icsk_accept_queue.listen_opt;

0 commit comments

Comments
 (0)