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 | 0c11b46178b80b179e50b26258d6c066875ec44b (patch) | |
tree | b5fbc58353c15cd3ec1613ec04f8fe0ee5f147ce /src | |
parent | 42ca9a17268bf39d0cd74fb9788c46c5a90bd99c (diff) |
socket: satisfy sparse
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-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)) |