Fixed a small bug in Protocol-Field-Compression handling.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5713 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Waldemar Kornewald 2003-12-19 11:52:31 +00:00
parent 53b9eef827
commit 1c29a4b054

View File

@ -1314,12 +1314,11 @@ PPPInterface::ReceiveFromDevice(struct mbuf *packet)
// decode ppp frame and recognize PFC
uint16 protocolNumber = *mtod(packet, uint8*);
if(protocolNumber & 0x80 || protocolNumber == 0) {
if(protocolNumber & 1) {
m_adj(packet, 1);
} else {
protocolNumber = ntohs(*mtod(packet, uint16*));
m_adj(packet, 2);
} else {
m_adj(packet, 1);
protocolNumber = *mtod(packet, uint8*);
}
return Receive(packet, protocolNumber);