From 150138bd01a241304a93dbd1f731de2ad4316fe6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 28 Jul 2017 01:02:21 +0200 Subject: socket: move print function from compat Signed-off-by: Jason A. Donenfeld --- src/compat/compat.h | 10 ---------- src/socket.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compat/compat.h b/src/compat/compat.h index e9ea77b..a373c83 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -395,14 +395,4 @@ static inline void new_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 #define __read_mostly #endif -#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) -#define net_dbg_skb_ratelimited(fmt, dev, skb, ...) do { \ - struct endpoint __endpoint; \ - socket_endpoint_from_skb(&__endpoint, skb); \ - net_dbg_ratelimited(fmt, dev, &__endpoint.addr, ##__VA_ARGS__); \ -} while(0) -#else -#define net_dbg_skb_ratelimited(fmt, skb, ...) -#endif - #endif diff --git a/src/socket.h b/src/socket.h index 3e99683..4d9e5f5 100644 --- a/src/socket.h +++ b/src/socket.h @@ -21,4 +21,14 @@ int socket_endpoint_from_skb(struct endpoint *endpoint, struct sk_buff *skb); void socket_set_peer_endpoint(struct wireguard_peer *peer, struct endpoint *endpoint); void socket_clear_peer_endpoint_src(struct wireguard_peer *peer); +#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) +#define net_dbg_skb_ratelimited(fmt, dev, skb, ...) do { \ + struct endpoint __endpoint; \ + socket_endpoint_from_skb(&__endpoint, skb); \ + net_dbg_ratelimited(fmt, dev, &__endpoint.addr, ##__VA_ARGS__); \ +} while(0) +#else +#define net_dbg_skb_ratelimited(fmt, skb, ...) +#endif + #endif -- cgit v1.2.3