summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2002-09-14 00:00:49 +0000
committerarchie <archie@FreeBSD.org>2002-09-14 00:00:49 +0000
commit8e0a5436891b7df3728e3584021eba95c6d3ccfe (patch)
tree63bbf1189d71dde3d826f105459ed244bdac394a /sys
parent57c880964051d411ff6f58ea80ab93527222defb (diff)
downloadFreeBSD-src-8e0a5436891b7df3728e3584021eba95c6d3ccfe.zip
FreeBSD-src-8e0a5436891b7df3728e3584021eba95c6d3ccfe.tar.gz
Relax checking of incoming PPTP GRE packets a bit: ignore a bogus payload
length field when there's no payload indicated by the header 'S' bit. This works around semi-brokenness in the Mac OS X PPTP client.
Diffstat (limited to 'sys')
-rw-r--r--sys/netgraph/ng_pptpgre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c
index d760ed8..f87e415 100644
--- a/sys/netgraph/ng_pptpgre.c
+++ b/sys/netgraph/ng_pptpgre.c
@@ -623,7 +623,7 @@ bad:
/* Sanity check packet length and GRE header bits */
extralen = m->m_pkthdr.len
- - (iphlen + grelen + (u_int16_t)ntohs(gre->length));
+ - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length));
if (extralen < 0) {
priv->stats.recvBadGRE++;
goto bad;
OpenPOWER on IntegriCloud