aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/ratelimiter.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: always find OOM unlikelyJason A. Donenfeld2018-09-041-3/+3
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* global: prefer sizeof(*pointer) when possibleJason A. Donenfeld2018-09-041-2/+2
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* global: satisfy check_patch.pl errorsJason A. Donenfeld2018-09-031-2/+2
|
* global: run through clang-formatJason A. Donenfeld2018-08-281-17/+30
| | | | | | | This is the worst commit in the whole repo, making the code much less readable, but so it goes with upstream maintainers. We are now woefully wrapped at 80 columns.
* ratelimiter: prevent init/uninit raceJason A. Donenfeld2018-07-311-4/+6
| | | | | | | Fixes a classic ABA problem that isn't actually reachable because of rtnl_lock, but it's good to be correct anyway. Reported-by: Jann Horn <jann@thejh.net>
* global: use fast boottime instead of normal boottimeJason A. Donenfeld2018-06-231-3/+3
| | | | Generally if we're inaccurate by a few nanoseconds, it doesn't matter.
* global: use ktime boottime instead of jiffiesJason A. Donenfeld2018-06-231-3/+3
| | | | | | | | Since this is a network protocol, expirations need to be accounted for, even across system suspend. On real systems, this isn't a problem, since we're clearing all keys before suspend. But on Android, where we don't do that, this is something of a problem. So, we switch to using boottime instead of jiffies.
* ratelimiter: do not allow concurrent init and uninitJason A. Donenfeld2018-06-191-0/+6
|
* ratelimiter: mitigate reference underflowJason A. Donenfeld2018-06-191-1/+1
|
* global: year bumpJason A. Donenfeld2018-01-031-1/+1
|
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-091-1/+4
| | | | | | | | | | | | | It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files. Update all files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Modified-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: style nitsJason A. Donenfeld2017-10-311-2/+4
|
* global: infuriating kernel iterator styleJason A. Donenfeld2017-10-311-3/+3
| | | | | | | | | | | | | | | | | One types: for (i = 0 ... So one should also type: for_each_obj (obj ... But the upstream kernel style guidelines are insane, and so we must instead do: for_each_obj(obj ... Ugly, but one must choose his battles wisely.
* global: satisfy bitshift pedantryJason A. Donenfeld2017-10-031-1/+1
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* ratelimiter: wait for destruction, not for read_unlockJason A. Donenfeld2017-10-021-1/+1
|
* ratelimiter: use KMEM_CACHE macroJason A. Donenfeld2017-07-201-6/+6
| | | | Suggested-by: Samuel Holland <samuel@sholland.org>
* ratelimiter: consistently use non-bh rcuJason A. Donenfeld2017-07-071-1/+1
|
* ratelimiter: add self-testJason A. Donenfeld2017-07-061-0/+2
|
* ratelimiter: use IPv6 /64 instead of /96Jason A. Donenfeld2017-07-041-8/+8
|
* ratelimiter: use kvzalloc for hash table allocationJason A. Donenfeld2017-07-041-9/+6
|
* global: cleanup IP header checkingJason A. Donenfeld2017-06-261-2/+2
| | | | This way is more correct and ensures we're within the skb head.
* ratelimiter: rewrite from scratchJason A. Donenfeld2017-06-261-96/+153
| | | | | | | This not only removes the depenency on x_tables, but it also gives us much better performance and memory usage. Now, systems are able to have millions of WireGuard interfaces, without having to worry about a thundering herd of garbage collection.
* data: big refactoringJason A. Donenfeld2017-03-201-1/+1
|
* ratelimiter: 800ms too fast, decrease to 2s sustained rateJason A. Donenfeld2017-01-151-2/+2
|
* Use __read_mostly attribute when possibleJason A. Donenfeld2017-01-131-2/+2
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* ratelimiter: remember newline in errorJason A. Donenfeld2016-12-161-2/+2
|
* ratelimiter: drop family from action for 4.10Jason A. Donenfeld2016-12-161-2/+0
| | | | | This was never actually used, and now that member of the struct has been removed all together from the kernel.
* compat: build dep errors belong here, since it's out of tree specificJason A. Donenfeld2016-12-091-8/+1
|
* ratelimiter: load hashlimit at modinsert timeJason A. Donenfeld2016-11-291-35/+46
| | | | This fixes a potential race with net_lock and rtnl_lock.
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* Rework headers and includesJason A. Donenfeld2016-09-291-2/+4
|
* ratelimiter: hard-depend on runtime dependenciesJason A. Donenfeld2016-08-091-0/+7
|
* ratelimiter: do not require IPv6experimental-0.0.20160808Jason A. Donenfeld2016-08-081-4/+12
|
* ratelimiter: correct commentJason A. Donenfeld2016-07-231-1/+1
|
* Initial commitJason A. Donenfeld2016-06-251-0/+119