summaryrefslogtreecommitdiffstats
path: root/src/server/net.c
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] rpc: Distinguish between client and server (proxy) connectionsSimon Rettberg2018-08-141-5/+14
|
* [SERVER] Use atomic var for (total)bytesSent countersSimon Rettberg2018-08-081-74/+47Star
| | | | | | Gets rid of the lastBytesSent field as well as the stats lock per client. Cleaned and split up the messy net_clientsToJson function while at it.
* [SERVER] Reduce debug spamSimon Rettberg2018-07-091-2/+1Star
|
* [SERVER] Refactor uplink/cache handling, improve crc checkingSimon Rettberg2018-07-041-2/+4
| | | | | | | | | | | | | The cacheFd is now moved to the uplink data structure and will only be handled by the uplink thread. The integrity checker now supports checking all blocks of an image. This will be triggered automatically whenever a check for a single block failed. Also, if a crc check on startup fails, the image won't be discarded anymore, but rather a full check will be initiated. Furthermore, when calling image_updateCacheMap() on an image that was previously complete, the cache map will now be re-initialized, and a new uplink connection created.
* [SERVER] Fix int overflows on 32bit builds in CRC generationSimon Rettberg2018-03-161-1/+1
|
* [SERVER] Make TSAN happySimon Rettberg2017-12-191-1/+3
|
* [SERVER] Add multiple config options for limiting stuffSimon Rettberg2017-11-081-1/+1
| | | | | maxClients, maxImages, maxPayload, maxReplicationSize Refs #3231
* [SERVER] altservers: Tweak, cleanup, refactor, renameSimon Rettberg2017-11-081-1/+1
|
* [SERVER] Support finer control over replication when a proxy connects to a proxySimon Rettberg2017-11-021-2/+22
| | | | | | | Introduce new flag in "select image" message to tell the uplink server whether we have background replication enabled or not. Also reject a connecting proxy if the connecting proxy uses BGR but we don't, as this would basically force the image to be replicated locally too.
* [SERVER] Since fuse client assumed no backwards compat before v3, lie to clientsSimon Rettberg2017-11-011-1/+1
| | | | | | If client reports protocol version < 3 on connect, just pretend we're at the same version. This sucks but we can't update servers before clients otherwise. :(
* [*] Mark logadd() as printf-style function, fix errors that it revealedSimon Rettberg2017-10-311-3/+4
| | | | ...there were quite a few format string errors as it turns out :/
* [SERVER] net.c: Refactoring and renamingSimon Rettberg2017-10-311-58/+33Star
| | | | | | Less copy & paste for sendfile alternatives, changed naming of old dnbd3_* functions moved over from server.c a while ago.
* [SERVER] Add AFL supportSimon Rettberg2017-10-301-1/+36
| | | | | | | | | | | AFL is an instrumenting fuzzer. It expects to pass input to the program to be tested via command line (file name) or via stdin. This adds support for reading messages that normally would arrive via network directly from stdin. In this mode, the server is pretty useless otherwise. http://lcamtuf.coredump.cx/afl/
* [SERVER] net: Simplify check for HTTPSimon Rettberg2017-10-261-10/+11
| | | | | Pretty loose guesswork, but preventing the false positives would not lead to any meaningful result anyways, so why bother.
* [SERVER] Improve handling of byte stats countersSimon Rettberg2017-10-251-12/+12
| | | | Less writes to variables, more up-to-date values for uplinks.
* [SERVER] Fix types or add explicit casts everywhere we might have type ↵Simon Rettberg2017-10-241-28/+29
| | | | conversion problems
* [SERVER] Mute signedness warning on 32bitSimon Rettberg2017-10-201-2/+2
|
* [SERVER] Use monotonic clock for measuring timeSimon Rettberg2017-10-191-2/+3
| | | | | Introduces new shared source unit timing.[ch] Closes #3214
* [*] Support hop-counting in request header, protocol version 3Simon Rettberg2017-10-171-12/+13
| | | | | | | | | | | | | | We steal 8 bits from the request offset to count hops when requests get relayed by proxies. This still leaves plenty of bits for the offset (56 bits, supporting images of up to 72 petabytes). This is used to detect proxy cycles. The algorithm is not perfect but should prevent endless relays of the same request. This is backwards compatible to old clients and servers, as the server only ever sets the hopcount in relayed requests if the upstream server is using protocol version 3 or newer, and clients are automatically upwards compatible as there is practically no image larger than 74PB, so the newly introduced hop count field is always 0 even in requests from old clients.
* [SERVER] Fix invalid pointer derefSimon Rettberg2017-10-061-1/+1
|
* [SERVER] Return client count when requesting stats but not client listSimon Rettberg2017-10-061-1/+7
|
* [SERVER] How about updating atime on connect?Simon Rettberg2017-10-041-0/+3
|
* [SERVER] Implement HTTP RPC that supports different queries and ACLSimon Rettberg2017-10-011-6/+14
| | | | | | | | | - ACL is defined in new file rpc.acl - Queries are still WIP, for now something like /query?q=stats&q=images /query?q=clients works, although the parsing is still ugly - Also supports HTTP keep-alive
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-071-60/+256
|
* [SERVER] Split server-only defs from config.h to serverconfig.hSimon Rettberg2017-08-261-1/+1
|
* [SERVER] Fix status query on big endianSimon Rettberg2017-08-211-4/+7
|
* [SERVER] Fix formattingSimon Rettberg2016-03-221-19/+19
|
* [SERVER] (FreeBSD) Unlock send mutex on sendfile errorSimon Rettberg2016-03-221-0/+1
|
* running FreeBSD sendfileSebastian2016-02-111-13/+36
|
* dnbd3server build success on freebsd :)Sebastian2016-02-111-1/+14
|
* cleanup commitsSebastian2016-02-111-21/+7Star
|
* [SERVER] BREAKING: Get rid of pseudo case-insensitivityv2.1Simon Rettberg2016-02-011-3/+3
| | | | | | | | | | This was a wrong decision made long time ago, and it's broken in certain scenarios (eg. two servers serving from same NFS mount). Also it's of limited use anyways since it only supportes ASCII and would ignore umlauts, so blöd and BLÖD would still be considered two different images. So if you relied on this "feature" in any way, be careful when updating.
* [SERVER] Fix a lot of (mostly harmless) data racesSimon Rettberg2016-01-111-12/+21
|
* [SERVER] More fine grained locking for RPC; better error loggingSimon Rettberg2015-12-161-31/+35
|
* [SERVER] Remove non-working images from list, plus refactoringSimon Rettberg2015-12-151-73/+119
| | | | | | | | | | Now that we can automatically load unknown images from disk on request, it makes sense to remove non-working images from the image list. On future requests, we will look for them on disk again, which is nice in case of temporary storage hickups. Also, some more ore less related locking has been refined (loading images, replicating images)
* [SERVER] Support looking on disk if an unknown image is requestedSimon Rettberg2015-12-121-1/+1
|
* [SERVER] Nullpad images virtually at runtime instead of padding the actual fileSimon Rettberg2015-12-101-7/+32
|
* [SERVER] Remove redundant range checkSimon Rettberg2015-12-091-8/+0Star
|
* [SERVER] Use error code constants instead of magic valuesSimon Rettberg2015-12-071-4/+4
|
* [SERVER] Update includes for moved log.hSimon Rettberg2015-12-021-1/+1
|
* [FUSE] Mid-refactoring, does not compileSimon Rettberg2015-11-241-1/+1
|
* [SERVER] Add image ID for easier handling in RPC, export RID via RPC, make ↵Simon Rettberg2015-05-081-1/+1
| | | | names of the byte count fields in RPC consistent
* [Server] Added statistics of images and uptime to json.Stephan Schwaer2015-05-051-10/+3Star
|
* Removed dnbd3_printClients, added clients to statistics json in rpc.Stephan Schwaer2015-05-041-3/+17
|
* [SERVER] PoC RPC interfaceschwaers2015-04-301-2/+6
|
* [SERVER] Added counters for received and sent bytes.Stephan Schwaer2015-04-271-0/+12
|
* [SERVER] printf -> logadd, make USR2 trigger a log cycle, remove old fake ↵Simon Rettberg2015-02-231-3/+0Star
| | | | delay feature
* [SERVER] Overhauled loggingSimon Rettberg2015-02-221-21/+21
| | | | | | - Added message type parameter - Log to file and stdout, no more logging in memory - Added options to server.conf to filter which messages show up where
* Get rid of unneccessary volatileSimon Rettberg2015-02-221-1/+1
| | | | Some minor debugging code, mostly commented out
* [SERVER] Fix bug where checking if a request is cached would yield a false ↵Simon Rettberg2015-02-191-6/+7
| | | | negative