aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/routingtable.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: cleanup IP header checkingJason A. Donenfeld2017-06-261-19/+4
| | | | This way is more correct and ensures we're within the skb head.
* routingtable: Remove unnecessary check in node_placement()Sultan Alsawaf2017-05-311-2/+1
| | | | | | | node_placement() is always given the address of a stack variable for rnode, so there's no need to check if rnode is null. Signed-off-by: Sultan Alsawaf <sultanxda@gmail.com>
* routingtable: rewrite core functionsJason A. Donenfeld2017-04-211-285/+126
| | | | | | | | | | | | | | | | | | | | | When removing by peer, prev needs to be set to *nptr in order to traverse that part of the trie. The other remove by IP function can simply be removed, as it's not in use. The root freeing function can use pre-order traversal instead of post-order. The pre-order traversal code in general is now a nice iterator macro. The common bits function can use the fast fls instructions and the match function can be rewritten to simply compare common bits. While we're at it, let's add tons of new tests, randomized checking against a dumb implementation, and graphviz output. And in general, it's nice to clean things up.
* locking: always use _bhJason A. Donenfeld2017-04-041-22/+26
| | | | | All locks are potentially between user context and softirq, which means we need to take the _bh variant.
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* routing-table: simplify and mask reparented rootJason A. Donenfeld2016-12-231-16/+9
|
* global: move to consistent use of uN instead of uintN_t for kernel codeJason A. Donenfeld2016-12-111-34/+34
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* routing-table: mask self for better IP displayJason A. Donenfeld2016-11-071-2/+6
|
* Rework headers and includesJason A. Donenfeld2016-09-291-1/+1
|
* routingtable: hyphen was uglyJason A. Donenfeld2016-08-221-0/+519