diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-06 16:24:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-06 16:24:46 +0200 |
commit | 24d239097a07acf37f587b2049162f90f385f41c (patch) | |
tree | 2c28b1a6102827f03bc8950a9284ccb2db87d9df /src/socket.h | |
parent | receive: do not consider 0 jiffies as being set (diff) | |
download | wireguard-monolithic-historical-24d239097a07acf37f587b2049162f90f385f41c.tar.xz wireguard-monolithic-historical-24d239097a07acf37f587b2049162f90f385f41c.zip |
socket: compare while unlocked first
This should be a bit faster.
Suggested-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'src/socket.h')
-rw-r--r-- | src/socket.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket.h b/src/socket.h index 08e98fe..2214a46 100644 --- a/src/socket.h +++ b/src/socket.h @@ -17,8 +17,8 @@ int socket_send_buffer_to_peer(struct wireguard_peer *peer, void *data, size_t l int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb, u8 ds); int socket_send_buffer_as_reply_to_skb(struct wireguard_device *wg, struct sk_buff *in_skb, void *out_buffer, size_t len); -int socket_endpoint_from_skb(struct endpoint *endpoint, struct sk_buff *skb); -void socket_set_peer_endpoint(struct wireguard_peer *peer, struct endpoint *endpoint); +int socket_endpoint_from_skb(struct endpoint *endpoint, const struct sk_buff *skb); +void socket_set_peer_endpoint(struct wireguard_peer *peer, const struct endpoint *endpoint); void socket_clear_peer_endpoint_src(struct wireguard_peer *peer); #if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) |