aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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-6/+12
|
* global: infuriating kernel iterator styleJason A. Donenfeld2017-10-311-5/+5
| | | | | | | | | | | | | | | | | 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: accept decent check_patch.pl suggestionsJason A. Donenfeld2017-10-311-3/+4
|
* stats: more robust accountingJason A. Donenfeld2017-10-311-0/+1
|
* send: improve dead packet control flowJason A. Donenfeld2017-10-171-6/+3
|
* send: do not requeue if packet is deadJason A. Donenfeld2017-10-111-1/+6
|
* queueing: cleanup skb_paddingJason A. Donenfeld2017-10-051-0/+14
|
* queueing: move from ctx to cbJason A. Donenfeld2017-10-051-54/+49
|
* queueing: use ptr_ring instead of linked listsJason A. Donenfeld2017-10-051-6/+15
|
* send: put keypair referenceJason A. Donenfeld2017-10-051-0/+1
|
* global: add space around variable declarationsJason A. Donenfeld2017-10-031-0/+1
|
* queueing: rename cpumask functionJason A. Donenfeld2017-09-191-1/+1
|
* send: don't take uninitialized lockJason A. Donenfeld2017-09-191-3/+3
| | | | | | Packets is a local, which means we need to use the functions that don't take a spinlock, since otherwise we'll be using a spinlock in an undefined state.
* queueing: no need to memzero structJason A. Donenfeld2017-09-191-1/+2
|
* queue: entirely rework parallel systemJason A. Donenfeld2017-09-181-60/+174
| | | | | | | | | | This removes our dependency on padata and moves to a different mode of multiprocessing that is more efficient. This began as Samuel Holland's GSoC project and was gradually reworked/redesigned/rebased into this present commit, which is a combination of his initial contribution and my subsequent rewriting and redesigning.
* send: no need to check for NULL since ref is validJason A. Donenfeld2017-09-161-3/+0
|
* noise: infer initiator or not from handshake stateJason A. Donenfeld2017-08-041-1/+1
| | | | Suggested-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
* timers: rename confusingly named functions and variablesJason A. Donenfeld2017-08-041-1/+1
| | | | Suggested-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
* send: use skb_queue_empty where appropriateSamuel Holland2017-07-201-3/+3
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: use pointer to net_deviceJason A. Donenfeld2017-07-201-5/+5
| | | | | | DaveM prefers it to be this way per [1]. [1] http://www.spinics.net/lists/netdev/msg443992.html
* send: orphan skbs when buffering longtermJason A. Donenfeld2017-07-201-1/+7
| | | | | | | | | Otherwise we quickly use up all of a socket's memory, which prevents a socket from sending packets to other interfaces. This also has the nice effect of letting TCP connections continue to attempt to begin, with the older ones being naturally rotated out and freed, so when a connection finally is made, only the later TCP connections are attempted, not the ones that would already have timed out.
* timers: reset retry-attempt counter when not retryingJason A. Donenfeld2017-05-311-3/+6
|
* debug: print interface name in dmesgJason A. Donenfeld2017-05-311-4/+4
|
* style: spaces after for loopsJason A. Donenfeld2017-05-301-1/+1
|
* handshake: process in parallelJason A. Donenfeld2017-05-301-1/+1
|
* data: cleanup parallel workqueue and use two max_activeJason A. Donenfeld2017-04-081-1/+1
|
* data: simplify flowJason A. Donenfeld2017-04-041-2/+2
|
* locking: always use _bhJason A. Donenfeld2017-04-041-10/+9
| | | | | All locks are potentially between user context and softirq, which means we need to take the _bh variant.
* data: big refactoringJason A. Donenfeld2017-03-201-3/+6
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* peer: don't use sockaddr_storage to reduce memory usageJason A. Donenfeld2016-12-131-3/+3
|
* device: clean up xmit error pathJason A. Donenfeld2016-12-111-3/+2
|
* send: send packet initiation only after requeuing to prevent raceJason A. Donenfeld2016-11-291-6/+11
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* debug: cleanup skb printingJason A. Donenfeld2016-11-151-5/+1
|
* socket: keep track of src address in sending packetsJason A. Donenfeld2016-11-151-6/+6
|
* send: simplify handshake initiation queueing and introduce lockJason A. Donenfeld2016-11-071-25/+31
|
* debug: support dynamic debug on skb addrJason A. Donenfeld2016-11-061-1/+1
|
* send: remove redundant time stampJason A. Donenfeld2016-11-061-1/+0
|
* socket: big refactoringJason A. Donenfeld2016-11-051-1/+1
|
* send: queue bundles on same CPUJason A. Donenfeld2016-11-041-148/+43
|
* timers: take reference like a lookup tableJason A. Donenfeld2016-11-031-7/+6
|
* timers: only have initiator rekeyJason A. Donenfeld2016-10-191-27/+15
| | | | | | | | | If it's time to rekey, and the responder sends a message, the initator will begin the rekeying when sending his response message. In the worst case, this response message will actually just be the keepalive. This generally works well, with the one edge case of the message arriving less than 10 seconds before key expiration, in which the keepalive is not sufficient. In this case, we simply rehandshake immediately.
* timers: always delay handshakes for responderJason A. Donenfeld2016-10-191-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the prior behavior, when sending a packet, we checked to see if it was about time to start a new handshake, and if we were past a certain time, we started it. For the responder, we made that time a bit further in the future than for the initiator, to prevent the thundering herd problem of them both starting at the same time. However, this was flawed. If both parties stopped communicating after 2.2 minutes, and then one party decided to initiate a TCP connection before the 3 minute mark, the currently open session would be used. However, because it was after the 2.2 minute mark, both peers would try to initiate a handshake upon sending their first packet. The errant flow was as follows: 1. Peer A sends SYN. 2. Peer A sees that his key is getting old and initiates new handshake. 3. Peer B receives SYN and sends ACK. 4. Peer B sees that his key is getting old and initiates new handshake. Since these events happened after the 2.2 minute mark, there's no delay between handshake initiations, and problems begin. The new behavior is changed to: 1. Peer A sends SYN. 2. Peer A sees that his key is getting old and initiates new handshake. 3. Peer B receives SYN and sends ACK. 4. Peer B sees that his key is getting old and schedules a delayed handshake for 12.5 seconds in the future. 5. Peer B receives handshake initiation and cancels scheduled handshake.
* debug: keep alive -> keepaliveJason A. Donenfeld2016-10-191-0/+1
|
* send: ensure that rekey retries are staggeredexperimental-0.0.20161014Jason A. Donenfeld2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Before: t+120: A sends rekey [packet dropped by network congestion] t+125: A sends rekey [packet dropped by network congestion] t+130: A sends rekey t+130: B sends rekey ! race ! After: t+120: A sends rekey [packet dropped by network congestion] t+125: A sends rekey [packet dropped by network congestion] t+130: A sends rekey [packet dropped by network congestion] T+132.5: B sends rekey [packet dropped by network congestion] T+135: A sends rekey [packet dropped by network congestion] T+137.5: B sends rekey ! success, eventually !
* send: requeue jobs for later if padata is fullJason A. Donenfeld2016-10-051-2/+13
|
* Rework headers and includesJason A. Donenfeld2016-09-291-4/+5
|
* send: properly encapsulate ECNJason A. Donenfeld2016-08-291-8/+19
| | | | We're not leaking the DSCP, but we do deal with ECN.