diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-14 18:51:50 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-15 01:16:50 +0200 |
commit | 14e7d0a499a676ec55176c0de2f9fcbd34074a82 (patch) | |
tree | 83dcd2810597acbb0b0626ede041cbce978283f0 | |
parent | device: IFF_NO_QUEUE is a private flag, not a public one (diff) | |
download | wireguard-monolithic-historical-14e7d0a499a676ec55176c0de2f9fcbd34074a82.tar.xz wireguard-monolithic-historical-14e7d0a499a676ec55176c0de2f9fcbd34074a82.zip |
socket: satisfy sparse
-rw-r--r-- | src/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c index 1dff57a..dce5313 100644 --- a/src/socket.c +++ b/src/socket.c @@ -45,13 +45,13 @@ static inline int send4(struct wireguard_device *wg, struct sk_buff *skb, struct if (!rt) { security_sk_classify_flow(sock, flowi4_to_flowi(&fl)); if (unlikely(!inet_confirm_addr(sock_net(sock), NULL, 0, fl.saddr, RT_SCOPE_HOST))) { - endpoint->src4.s_addr = endpoint->src_if4 = fl.saddr = 0; + endpoint->src4.s_addr = *(__force __be32 *)&endpoint->src_if4 = fl.saddr = 0; if (cache) dst_cache_reset(cache); } rt = ip_route_output_flow(sock_net(sock), &fl, sock); if (unlikely(endpoint->src_if4 && ((IS_ERR(rt) && PTR_ERR(rt) == -EINVAL) || (!IS_ERR(rt) && rt->dst.dev->ifindex != endpoint->src_if4)))) { - endpoint->src4.s_addr = endpoint->src_if4 = fl.saddr = 0; + endpoint->src4.s_addr = *(__force __be32 *)&endpoint->src_if4 = fl.saddr = 0; if (cache) dst_cache_reset(cache); if (!IS_ERR(rt)) |