diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-28 03:05:22 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-02 03:41:49 +0200 |
commit | 45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0 (patch) | |
tree | 9409e8289e08211e35e8cdeef0e509e1e254acc0 /src/ratelimiter.c | |
parent | poly1305-mips64: use compiler-defined macros in assembly (diff) | |
download | wireguard-monolithic-historical-45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0.tar.xz wireguard-monolithic-historical-45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0.zip |
global: prefix all functions with wg_
I understand why this must be done, though I'm not so happy about having
to do it. In some places, it puts us over 80 chars and we have to break
lines up in further ugly ways. And in general, I think this makes things
harder to read. Yet another thing we must do to please upstream.
Maybe this can be replaced in the future by some kind of automatic
module namespacing logic in the linker, or even combined with LTO and
aggressive symbol stripping.
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Diffstat (limited to 'src/ratelimiter.c')
-rw-r--r-- | src/ratelimiter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ratelimiter.c b/src/ratelimiter.c index 6e43d6e..a5fa3a4 100644 --- a/src/ratelimiter.c +++ b/src/ratelimiter.c @@ -82,7 +82,7 @@ static void gc_entries(struct work_struct *work) queue_delayed_work(system_power_efficient_wq, &gc_work, HZ); } -bool ratelimiter_allow(struct sk_buff *skb, struct net *net) +bool wg_ratelimiter_allow(struct sk_buff *skb, struct net *net) { struct { __be64 ip; u32 net; } data = { .net = (unsigned long)net & 0xffffffff }; @@ -152,7 +152,7 @@ err_oom: return false; } -int ratelimiter_init(void) +int wg_ratelimiter_init(void) { mutex_lock(&init_lock); if (atomic64_inc_return(&refcnt) != 1) @@ -199,7 +199,7 @@ err: return -ENOMEM; } -void ratelimiter_uninit(void) +void wg_ratelimiter_uninit(void) { mutex_lock(&init_lock); if (atomic64_dec_if_positive(&refcnt)) |