diff options
author | archie <archie@FreeBSD.org> | 2002-09-14 00:00:49 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 2002-09-14 00:00:49 +0000 |
commit | 8e0a5436891b7df3728e3584021eba95c6d3ccfe (patch) | |
tree | 63bbf1189d71dde3d826f105459ed244bdac394a /sys/netgraph | |
parent | 57c880964051d411ff6f58ea80ab93527222defb (diff) | |
download | FreeBSD-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/netgraph')
-rw-r--r-- | sys/netgraph/ng_pptpgre.c | 2 |
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; |