net: ipv4: Fix type casting to resolve compilation errors
Fix type casting in IPv4 and IPV6 driver to avoid compilation issues for ARCH=um on x86_64. CRs-Fixed: 996252 Change-Id: Ic3ed8affa2c5bc8fd9b403614f692ab01e1a307a Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
This commit is contained in:
parent
3ee8625f41
commit
9df7002903
3 changed files with 7 additions and 5 deletions
|
@ -427,7 +427,7 @@ struct dst_entry *inet_csk_route_req(const struct sock *sk,
|
|||
sk->sk_protocol, inet_sk_flowi_flags(sk),
|
||||
(opt && opt->opt.srr) ? opt->opt.faddr : ireq->ir_rmt_addr,
|
||||
ireq->ir_loc_addr, ireq->ir_rmt_port,
|
||||
htons(ireq->ir_num), sock_i_uid(sk));
|
||||
htons(ireq->ir_num), sock_i_uid((struct sock *)sk));
|
||||
security_req_classify_flow(req, flowi4_to_flowi(fl4));
|
||||
rt = ip_route_output_flow(net, fl4, sk);
|
||||
if (IS_ERR(rt))
|
||||
|
@ -464,7 +464,7 @@ struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
|
|||
sk->sk_protocol, inet_sk_flowi_flags(sk),
|
||||
(opt && opt->opt.srr) ? opt->opt.faddr : ireq->ir_rmt_addr,
|
||||
ireq->ir_loc_addr, ireq->ir_rmt_port,
|
||||
htons(ireq->ir_num), sock_i_uid(sk));
|
||||
htons(ireq->ir_num), sock_i_uid((struct sock *)sk));
|
||||
security_req_classify_flow(req, flowi4_to_flowi(fl4));
|
||||
rt = ip_route_output_flow(net, fl4, sk);
|
||||
if (IS_ERR(rt))
|
||||
|
|
|
@ -830,7 +830,8 @@ static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst,
|
|||
struct sk_buff *skb;
|
||||
|
||||
/* First, grab a route. */
|
||||
if (!dst && (dst = inet_csk_route_req(sk, &fl4, req)) == NULL)
|
||||
if (!dst && (dst = inet_csk_route_req(
|
||||
(struct sock *)sk, &fl4, req)) == NULL)
|
||||
return -1;
|
||||
|
||||
skb = tcp_make_synack(sk, dst, req, foc, attach_req);
|
||||
|
@ -1189,7 +1190,8 @@ static struct dst_entry *tcp_v4_route_req(const struct sock *sk,
|
|||
const struct request_sock *req,
|
||||
bool *strict)
|
||||
{
|
||||
struct dst_entry *dst = inet_csk_route_req(sk, &fl->u.ip4, req);
|
||||
struct dst_entry *dst = inet_csk_route_req(
|
||||
(struct sock *)sk, &fl->u.ip4, req);
|
||||
|
||||
if (strict) {
|
||||
if (fl->u.ip4.daddr == inet_rsk(req)->ir_rmt_addr)
|
||||
|
|
|
@ -86,7 +86,7 @@ struct dst_entry *inet6_csk_route_req(const struct sock *sk,
|
|||
fl6->flowi6_mark = ireq->ir_mark;
|
||||
fl6->fl6_dport = ireq->ir_rmt_port;
|
||||
fl6->fl6_sport = htons(ireq->ir_num);
|
||||
fl6->flowi6_uid = sock_i_uid(sk);
|
||||
fl6->flowi6_uid = sock_i_uid((struct sock *)sk);
|
||||
security_req_classify_flow(req, flowi6_to_flowi(fl6));
|
||||
|
||||
dst = ip6_dst_lookup_flow(sk, fl6, final_p);
|
||||
|
|
Loading…
Add table
Reference in a new issue