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.
This commit is contained in:
parent
2e4dbbaa93
commit
cc78c48a68
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103308
@ -623,7 +623,7 @@ ng_pptpgre_recv(node_p node, item_p item)
|
||||
|
||||
/* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user