diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-07-28 01:02:21 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-07-28 01:02:21 +0200 |
commit | 150138bd01a241304a93dbd1f731de2ad4316fe6 (patch) | |
tree | 3453a27b8dae13d36dfaca6bca60e60f1636d595 | |
parent | 83477092d2f93970974c75c890157eb34db48b9b (diff) |
socket: move print function from compat
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/compat/compat.h | 10 | ||||
-rw-r--r-- | 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 |