diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2017-10-06 07:46:45 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2017-10-06 07:46:45 +0000 |
commit | 85f7eb3b0d5b7b1427f51ed23f603b9456f4e260 (patch) | |
tree | e4024a7be12d21e19914ae32a2ac9dd5cb438646 /usr.sbin | |
parent | 60bf7aaf9af86e3a2467097636fee65758e25310 (diff) |
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')
-rw-r--r-- | usr.sbin/npppd/l2tp/l2tpd.c | 6 |
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, |