socket.c (8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17) | socket.c (20ae1d6aa159eb91a9bf09ff92ccaa94dbea92c2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 */ 5 6#include "device.h" 7#include "peer.h" 8#include "socket.h" --- 294 unchanged lines hidden (view full) --- 303 if (!wg_socket_endpoint_from_skb(&endpoint, skb)) 304 wg_socket_set_peer_endpoint(peer, &endpoint); 305} 306 307void wg_socket_clear_peer_endpoint_src(struct wg_peer *peer) 308{ 309 write_lock_bh(&peer->endpoint_lock); 310 memset(&peer->endpoint.src6, 0, sizeof(peer->endpoint.src6)); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 */ 5 6#include "device.h" 7#include "peer.h" 8#include "socket.h" --- 294 unchanged lines hidden (view full) --- 303 if (!wg_socket_endpoint_from_skb(&endpoint, skb)) 304 wg_socket_set_peer_endpoint(peer, &endpoint); 305} 306 307void wg_socket_clear_peer_endpoint_src(struct wg_peer *peer) 308{ 309 write_lock_bh(&peer->endpoint_lock); 310 memset(&peer->endpoint.src6, 0, sizeof(peer->endpoint.src6)); |
311 dst_cache_reset(&peer->endpoint_cache); | 311 dst_cache_reset_now(&peer->endpoint_cache); |
312 write_unlock_bh(&peer->endpoint_lock); 313} 314 315static int wg_receive(struct sock *sk, struct sk_buff *skb) 316{ 317 struct wg_device *wg; 318 319 if (unlikely(!sk)) --- 117 unchanged lines hidden --- | 312 write_unlock_bh(&peer->endpoint_lock); 313} 314 315static int wg_receive(struct sock *sk, struct sk_buff *skb) 316{ 317 struct wg_device *wg; 318 319 if (unlikely(!sk)) --- 117 unchanged lines hidden --- |