summaryrefslogtreecommitdiffstats
path: root/usr.sbin/npppd
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2017-10-06 07:46:44 +0000
committeryasuoka <yasuoka@openbsd.org>2017-10-06 07:46:44 +0000
commitde543defde83a71a567d035ba57885db87643b07 (patch)
treee6a6c3ca5a5d74a5b82b3e1c303bef484747ee40 /usr.sbin/npppd
parentvmm: handle 32 bit guest w/PAE when guest enables PAE first then paging, (diff)
downloadwireguard-openbsd-de543defde83a71a567d035ba57885db87643b07.tar.xz
wireguard-openbsd-de543defde83a71a567d035ba57885db87643b07.zip
The problem when npppd receives a zero length 1701/udp packet seemed to
be fixed at 1.16, but it wasn't fixed. Fix it again.
Diffstat (limited to 'usr.sbin/npppd')
-rw-r--r--usr.sbin/npppd/l2tp/l2tpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/npppd/l2tp/l2tpd.c b/usr.sbin/npppd/l2tp/l2tpd.c
index e2b2c9d04be..aa5cff1d594 100644
--- a/usr.sbin/npppd/l2tp/l2tpd.c
+++ b/usr.sbin/npppd/l2tp/l2tpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: l2tpd.c,v 1.19 2016/03/21 00:49:36 guenther Exp $ */
+/* $OpenBSD: l2tpd.c,v 1.20 2017/10/06 07:46:44 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*/
/**@file L2TP(Layer Two Tunneling Protocol "L2TP") / RFC2661 */
-/* $Id: l2tpd.c,v 1.19 2016/03/21 00:49:36 guenther Exp $ */
+/* $Id: l2tpd.c,v 1.20 2017/10/06 07:46:44 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -615,7 +615,7 @@ l2tpd_io_event(int fd, short evtype, void *ctx)
sizeof(buf), 0,
(struct sockaddr *)&peer, &peerlen,
(struct sockaddr *)&sock, &socklen,
- &sa_cookie, &sa_cookie_len)) <= 0) {
+ &sa_cookie, &sa_cookie_len)) == -1) {
#else
if ((sz = recvfromto(_this->sock, buf,
sizeof(buf), 0,