| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
EINTR was apparently not handled properly on non-linux for the
connect() syscall.
sockaddr2dnbd3 is what resolveToDnbd3Host already did internally,
now it's its own function.
sock_multiConnect() is a wrapper around connect() and poll,
making it easy to connect to multiple hosts in a cascaded manner,
with a slight delay between connect calls.
|
|
|
|
|
|
|
| |
5 servers are considered "active", that is, are being measured
for their RTT regularly. If We have more than 5 servers and
one of the active ones isn't reachable repeatedly, the two
servers will swap position.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This could have been an external tool, but this didn't add much code
and has the benefit of honoring the config file for port and bind address.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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. :(
|
| |
|
|
|
|
| |
...there were quite a few format string errors as it turns out :/
|
|
|
|
|
|
| |
Less copy & paste for sendfile alternatives,
changed naming of old dnbd3_* functions moved
over from server.c a while ago.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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/
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
AF_INET luckily was "2" on all platforms checked, so no problems
there with interoperation, but AF_INET6 is different between
Linux, BSD, Windows and possibly others, so map back and forth
between AF_INET/AF_INET6 and HOST_IP4/HOST_IP6 to fix this.
|
|
|
|
|
|
| |
Use it to properly parse RPC queries. Will also come in handy
when parsing POST body for calls that actually trigger any
actions in the server (reload, alt-servers, ...)
|
|
|
|
|
|
|
| |
Simple and lean interface, no bloat, noice.
Slighly modified to use a simple string struct
for passing around strings that are not null
terminated, instead of separate char* and length.
|
|
|
|
|
| |
Pretty loose guesswork, but preventing the false positives
would not lead to any meaningful result anyways, so why bother.
|
| |
|
|
|
|
|
| |
Incremental updating of the global byte counter would only work when
background replication is disabled. Fix this.
|
| |
|
|
|
|
| |
Less writes to variables, more up-to-date values for uplinks.
|
|
|
|
|
|
| |
We order the list so that servers that fail are kept at
the end of the list. This is so that when we fetch servers
for RTT measurement, we're less likely to pick those.
|
|
|
|
|
|
| |
Previously, a fresh one was created and destroyed fo every read
requests. This caused a lot of syscalls when reading. Now
there's a simple cache of currently up to 6 signalfd.
|
|
|
|
|
|
|
| |
The server is always backwards compatible, and so should be the
client. If support for an older version will not be kept up,
MIN_SUPPORTED_{CLIENT,SERVER} will be increased accordingly
so that the connection is dropped.
|
| |
|
| |
|
|
|
|
|
|
| |
We only used it for CRC-32, so now the source
tree includes a stripped down version of the crc32
code from the zlib project.
|
|
|
|
| |
conversion problems
|
| |
|
| |
|
|
|
|
|
| |
Introduces new shared source unit timing.[ch]
Closes #3214
|
|
|
|
|
| |
This needs an overhaul; status needs to be moved from global
alt-servers list to individual uplinks
|
|
|
|
| |
false positives
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This changed in 4.11, see
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dc3b17cc8bf21307c7e076e7c778d5db756f7871
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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
|