diff options
author | 2012-01-18 02:02:53 +0000 | |
---|---|---|
committer | 2012-01-18 02:02:53 +0000 | |
commit | 6117a981ef3432293f6dd4215845e2c8dd315eeb (patch) | |
tree | 13cdf1c5892e14784b74ff9762502406bffe6cd3 | |
parent | Remove assembly version of strlen from i386 and amd64, where it's (diff) | |
download | wireguard-openbsd-6117a981ef3432293f6dd4215845e2c8dd315eeb.tar.xz wireguard-openbsd-6117a981ef3432293f6dd4215845e2c8dd315eeb.zip |
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
-rw-r--r-- | sys/net/pipex.c | 12 |
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 |