aboutsummaryrefslogtreecommitdiffstats
path: root/wg-dynamic-server.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use siphash for hashtablesThomas Gschwantner2019-12-111-1/+3
|
* Properly send and display wg_errno and errmsgThomas Gschwantner2019-12-111-6/+13
|
* Extract all RTNETLINK code into ipm.{c,h}Thomas Gschwantner2019-12-111-57/+24
|
* Serialize/deserialize messages into a structThomas Gschwantner2019-12-111-87/+117
| | | | | | Instead of a list of attributes, parse messages into a proper struct to avoid duplicating code in the server/client for handling this list, as well as making parsing nicer in general.
* Stop passing devname and ifindex aroundLinus Nordberg2019-12-111-7/+6
|
* Ignore routes not for the wg interfaceLinus Nordberg2019-12-111-2/+2
| | | | | Adding 127.0.0.0/8 (lo) for example is not what we want. Didn't happen in tests/netsh.sh because the use of network namespaces.
* server: restore leases from allowedips at startupLinus Nordberg2019-12-111-1/+29
|
* server: add --leasetime as a commandline optionLinus Nordberg2019-12-111-5/+36
|
* lease: handle allowedips updates and improve APILinus Nordberg2019-12-111-47/+13
|
* Improve error handling and serializationThomas Gschwantner2019-08-201-49/+32
|
* Initialize pools from routes via netlinkThomas Gschwantner2019-08-171-7/+47
|
* Implement lease expirationThomas Gschwantner2019-07-181-3/+3
|
* Use epoll() instead of poll()Thomas Gschwantner2019-06-141-84/+115
| | | | | This enables us to later use the timeout parameter of epoll_wait() to timely remove expired leases.
* Don't overwrite peer changes by othersThomas Gschwantner2019-06-131-46/+28
|
* Implement basic lease managementThomas Gschwantner2019-06-121-126/+89
|
* Use hashtable to match ll-ip with pubkeyThomas Gschwantner2019-06-021-31/+34
| | | | | | The link-local IP is always /128, so using a hashtable is more appropriate here. We only use the lower 64 bits as key, since the first 64 bits of link-local addresses are always the same.
* No need to clear bits in pollfd reventsLinus Nordberg2019-05-261-3/+0
| | | | | | | | POSIX says: "In each pollfd structure, poll() shall clear the revents member, except that where the application requested a report on a condition by setting one of the bits of events listed above, poll() shall set the corresponding bit in revents if the requested condition is true."
* Implement client sending ip-request and configuring interfaceLinus Nordberg2019-05-261-3/+9
|
* Implement faked allocations, server sideLinus Nordberg2019-05-261-85/+233
| | | | | | | | | | Reject clients not connecting from an IPv6 address. Reject clients not connecting from the correct port. Fake address allocation. Update allowed-ips with leases handed out. Send response messages. Extend protocol to include lease start and lease time, errno and errmsg. Move common code to common.[ch].
* Accept multiple connections in one goThomas Gschwantner2019-02-251-12/+28
|
* Match incoming IP with pubkeyThomas Gschwantner2019-02-251-10/+87
|
* Implement key=value parsingThomas Gschwantner2019-02-091-41/+64
|
* Fix licensing headersThomas Gschwantner2019-01-271-3/+2
|
* Implement basic validation and I/O multiplexingThomas Gschwantner2019-01-261-25/+292
|
* Initialize project with scafolding and embeddable-wg-libraryJason A. Donenfeld2019-01-241-0/+40