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:
@@ -1314,12 +1314,11 @@ PPPInterface::ReceiveFromDevice(struct mbuf *packet)
|
|||||||
|
|
||||||
// decode ppp frame and recognize PFC
|
// decode ppp frame and recognize PFC
|
||||||
uint16 protocolNumber = *mtod(packet, uint8*);
|
uint16 protocolNumber = *mtod(packet, uint8*);
|
||||||
if(protocolNumber & 0x80 || protocolNumber == 0) {
|
if(protocolNumber & 1) {
|
||||||
|
m_adj(packet, 1);
|
||||||
|
} else {
|
||||||
protocolNumber = ntohs(*mtod(packet, uint16*));
|
protocolNumber = ntohs(*mtod(packet, uint16*));
|
||||||
m_adj(packet, 2);
|
m_adj(packet, 2);
|
||||||
} else {
|
|
||||||
m_adj(packet, 1);
|
|
||||||
protocolNumber = *mtod(packet, uint8*);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Receive(packet, protocolNumber);
|
return Receive(packet, protocolNumber);
|
||||||
|
|||||||
Reference in New Issue
Block a user