From 24d239097a07acf37f587b2049162f90f385f41c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 6 Oct 2017 16:24:46 +0200 Subject: socket: compare while unlocked first This should be a bit faster. Suggested-by: Willy Tarreau --- src/socket.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socket.h') 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) -- cgit v1.2.3-59-g8ed1b