diff options
| author | Eric Dumazet <[email protected]> | 2013-10-10 07:04:37 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2013-10-10 18:37:35 +0000 |
| commit | b44084c2c822f99dd3f2334b288b7e463d222662 (patch) | |
| tree | 5fbcaffd319347ee5d22800c231eef2b4c44b007 /net/ipv4/tcp_output.c | |
| parent | tcp: use ACCESS_ONCE() in tcp_update_pacing_rate() (diff) | |
| download | kernel-b44084c2c822f99dd3f2334b288b7e463d222662.tar.gz kernel-b44084c2c822f99dd3f2334b288b7e463d222662.zip | |
inet: rename ir_loc_port to ir_num
In commit 634fb979e8f ("inet: includes a sock_common in request_sock")
I forgot that the two ports in sock_common do not have same byte order :
skc_dport is __be16 (network order), but skc_num is __u16 (host order)
So sparse complains because ir_loc_port (mapped into skc_num) is
considered as __u16 while it should be __be16
Let rename ir_loc_port to ireq->ir_num (analogy with inet->inet_num),
and perform appropriate htons/ntohs conversions.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Wu Fengguang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index faec81353522..2822ad021a48 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2734,7 +2734,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, th->syn = 1; th->ack = 1; TCP_ECN_make_synack(req, th); - th->source = ireq->ir_loc_port; + th->source = htons(ireq->ir_num); th->dest = ireq->ir_rmt_port; /* Setting of flags are superfluous here for callers (and ECE is * not even correctly set) |
