diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2019-10-08 23:59:41 +0200 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-10-09 01:18:33 +0200 |
commit | 56b3d9cd2d85ee8c6d0c3d012ae9b3f6ae1b3d25 (patch) | |
tree | 3f728ff71d59b42097732060141708f081660001 /wg-dynamic-client.c | |
parent | radix-trie: allow full use of the v4 address space (diff) | |
download | wg-dynamic-56b3d9cd2d85ee8c6d0c3d012ae9b3f6ae1b3d25.tar.xz wg-dynamic-56b3d9cd2d85ee8c6d0c3d012ae9b3f6ae1b3d25.zip |
Fix parsing issue with split messagestg/devel
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.
Diffstat (limited to 'wg-dynamic-client.c')
-rw-r--r-- | wg-dynamic-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wg-dynamic-client.c b/wg-dynamic-client.c index e425a27..2edb413 100644 --- a/wg-dynamic-client.c +++ b/wg-dynamic-client.c @@ -68,7 +68,7 @@ static void check_signal() static int request_ip(struct wg_dynamic_request_ip *rip) { unsigned char buf[RECV_BUFSIZE + MAX_LINESIZE]; - size_t msglen, remaining, off = 0; + size_t msglen, remaining = 0, off = 0; struct sockaddr_in6 dstaddr = { .sin6_family = AF_INET6, .sin6_addr = well_known, |