mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
PPP: filter more packets in ppp_dump_packet
VJ packets, Compressed packets, IPv4 and IPv6 packets are useless in the PPP packet dump. We properly filtered IPv4 and IPv6 packets but we forgot filtering VJ and Compressed packets. Improve the filtering rule to filter packets which are not auth protocol (< 0xC000) and which are not control protocol (0x8000 bit not set).
This commit is contained in:
parent
18fcc1d504
commit
3194c9c4cf
@ -706,15 +706,11 @@ void ppp_dump_packet(const char *tag, unsigned char *p, int len) {
|
||||
int proto;
|
||||
|
||||
/*
|
||||
* don't print IPv4 and IPv6 packets.
|
||||
* don't print data packets, i.e. IPv4, IPv6, VJ, and compressed packets.
|
||||
*/
|
||||
proto = (p[0] << 8) + p[1];
|
||||
if (proto == PPP_IP)
|
||||
if (proto < 0xC000 && (proto & ~0x8000) == proto)
|
||||
return;
|
||||
#if PPP_IPV6_SUPPORT
|
||||
if (proto == PPP_IPV6)
|
||||
return;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* don't print LCP echo request/reply packets if the link is up.
|
||||
|
Loading…
Reference in New Issue
Block a user