aboutsummaryrefslogtreecommitdiffstats
path: root/wg-dynamic-client.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Properly send and display wg_errno and errmsgThomas Gschwantner2019-12-111-10/+35
|
* Change request_ip protocolThomas Gschwantner2019-12-111-8/+6
| | | | | | | | | | | | | | ipv4 and ipv6 keys have been combined into one common key, ip. To distinguish between multiple IPs in later versions ip=0.0.0.0/32 and ip=::/128 respectively now mean we want to be assigned a random address from the server. Releasing/not wanting an IP is now done by just not listing that IP, i.e. if we only wanted an (random) ipv4 address the request would look as follows: request_ip=1 ip=0.0.0.0/32
* Fix parsing issue with split messagesThomas Gschwantner2019-12-111-1/+1
| | | | | | | Previously this would trigger a BUG_ON() since the calculation of length & offset was wrong since we added the previous part of the buffer (req->buf) in parse_request(). This meant handle_request() couldn't know how much bytes where actually left in the buffer or their offset.
* Fixup client, including a lot of refactoringThomas Gschwantner2019-12-111-354/+196
|
* Implement lease expirationThomas Gschwantner2019-07-181-1/+0
|
* Use epoll() instead of poll()Thomas Gschwantner2019-06-141-9/+2
| | | | | This enables us to later use the timeout parameter of epoll_wait() to timely remove expired leases.
* Implement basic lease managementThomas Gschwantner2019-06-121-22/+28
|
* Sleep lessLinus Nordberg2019-05-261-3/+5
| | | | | Only sleep after failed try_connect(), because it might fail quickly. The read should be blocking for 1s (SO_RCVTIMEO).
* Use blocking I/O in clientLinus Nordberg2019-05-261-119/+39
| | | | Avoiding the unnecessary complexity of non-blocking I/O.
* No need to clear bits in pollfd reventsLinus Nordberg2019-05-261-2/+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-20/+509
|
* Fix licensing headersThomas Gschwantner2019-01-271-3/+3
|
* Initialize project with scafolding and embeddable-wg-libraryJason A. Donenfeld2019-01-241-0/+40