summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-01-18 02:02:54 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-01-18 02:02:54 +0000
commitdcefcfd0b7c4f9d477780074d9cc12800498c62b (patch)
tree1a6c659e76f703d7514132b56ecc4caabcd7ef67 /sys/net
parent8b32f16e7fe9c826ca4e787966cb27b77363be0e (diff)
Fix a problem that causes LCP keepalive timeout. In case the ack number of
a packet that is passed to the userland has not incremented, `pipex' passed the packet mistakenly with invalid ack number. Then `npppd' will drop these packets, so that caused the problem. tested jmatthew ok jmatthew
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pipex.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index 4faeed963cb..2210bb8a995 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.23 2011/11/25 13:05:06 yasuoka Exp $ */
+/* $OpenBSD: pipex.c,v 1.24 2012/01/18 02:02:53 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -1660,10 +1660,8 @@ pipex_pptp_input(struct mbuf *m0, struct pipex_session *session)
} else if (SEQ32_GT(ack, pptp_session->snd_nxt)) {
reason = "ack for unknown sequence";
goto out_seq;
- } else {
- ack++;
- pptp_session->snd_una = ack;
- }
+ } else
+ pptp_session->snd_una = ack + 1;
}
if (!has_seq) {
/* ack only packet */
@@ -1706,9 +1704,7 @@ pipex_pptp_input(struct mbuf *m0, struct pipex_session *session)
goto out_seq;
not_ours:
- /* revert original seq/ack values */
- seq--;
- ack--;
+ seq--; /* revert original seq value */
/*
* overwrite sequence numbers to adjust a gap between pipex and