diff options
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c index 0b97818..8506075 100644 --- a/src/socket.c +++ b/src/socket.c @@ -255,6 +255,14 @@ out: read_unlock_bh(&peer->endpoint_lock); } +void socket_clear_peer_endpoint_src(struct wireguard_peer *peer) +{ + write_lock_bh(&peer->endpoint_lock); + memset(&peer->endpoint.src6, 0, sizeof(peer->endpoint.src6)); + dst_cache_reset(&peer->endpoint_cache); + write_unlock_bh(&peer->endpoint_lock); +} + static int receive(struct sock *sk, struct sk_buff *skb) { struct wireguard_device *wg; |