inet: rename ir_loc_port to ir_num
In commit 634fb979e8
("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 <edumazet@google.com>
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ba537427d7
commit
b44084c2c8
@@ -266,10 +266,10 @@ int dccp_reqsk_init(struct request_sock *req,
|
||||
{
|
||||
struct dccp_request_sock *dreq = dccp_rsk(req);
|
||||
|
||||
inet_rsk(req)->ir_rmt_port = dccp_hdr(skb)->dccph_sport;
|
||||
inet_rsk(req)->ir_loc_port = dccp_hdr(skb)->dccph_dport;
|
||||
inet_rsk(req)->acked = 0;
|
||||
dreq->dreq_timestamp_echo = 0;
|
||||
inet_rsk(req)->ir_rmt_port = dccp_hdr(skb)->dccph_sport;
|
||||
inet_rsk(req)->ir_num = ntohs(dccp_hdr(skb)->dccph_dport);
|
||||
inet_rsk(req)->acked = 0;
|
||||
dreq->dreq_timestamp_echo = 0;
|
||||
|
||||
/* inherit feature negotiation options from listening socket */
|
||||
return dccp_feat_clone_list(&dp->dccps_featneg, &dreq->dreq_featneg);
|
||||
|
Reference in New Issue
Block a user