diff options
author | 2017-02-17 00:29:22 +0000 | |
---|---|---|
committer | 2017-02-17 00:29:22 +0000 | |
commit | 7c8731c159f1e89336d47e82ef042c71c8bb1b16 (patch) | |
tree | cd72d57c22feb2831aaf33edcab763c55f4cadc4 /lib/libc | |
parent | Fix type of argv. Found by clang. (diff) | |
download | wireguard-openbsd-7c8731c159f1e89336d47e82ef042c71c8bb1b16.tar.xz wireguard-openbsd-7c8731c159f1e89336d47e82ef042c71c8bb1b16.zip |
Increase UDP packet buffer to 4096 bytes from 512. There are some really
broken DNS servers out there that send packets >512 bytes w/o even the
courtesy of trying to use EDNS0.
A partial workaround as more complete packet parsing solutions are
worked on.
ok jca@ eric@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/asr/res_send_async.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c index 50246a12630..ff7d917b6f5 100644 --- a/lib/libc/asr/res_send_async.c +++ b/lib/libc/asr/res_send_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send_async.c,v 1.29 2015/10/23 00:52:09 deraadt Exp $ */ +/* $OpenBSD: res_send_async.c,v 1.30 2017/02/17 00:29:22 krw Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -449,7 +449,9 @@ udp_recv(struct asr_query *as) ssize_t n; int save_errno; - if (ensure_ibuf(as, PACKETSZ) == -1) { +#define MAXPACKETSZ 4096 + + if (ensure_ibuf(as, MAXPACKETSZ) == -1) { save_errno = errno; close(as->as_fd); errno = save_errno; |