diff options
| author | Jeevan Shriram <jshriram@codeaurora.org> | 2016-03-28 18:24:34 -0700 |
|---|---|---|
| committer | Bryan Huntsman <bryanh@codeaurora.org> | 2016-04-12 15:49:42 -0700 |
| commit | 9df700290378101ac48fda179d7258b37780fa4f (patch) | |
| tree | 0aef6c6eeec4bc31d5abe9a325d1eeec52112cf1 | |
| parent | 3ee8625f4189f166d69f825dab3ed97fcc6f7b3f (diff) | |
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>
| -rw-r--r-- | net/ipv4/inet_connection_sock.c | 4 | ||||
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 6 | ||||
| -rw-r--r-- | net/ipv6/inet6_connection_sock.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index fd1946ca8aec..82a93aef5a9e 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -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)) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index bdcc8a85209c..3cafb12bdb20 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -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) diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 7b214652768e..897bb6eb5751 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c @@ -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); |
