PPP: fix don't print valid LCP echo request/reply packets if the link is up

The check for link up was missing, meaning valid LCP echo request/reply
packets are filtered whatever the PPP state is, despite what the comment
says.

Fix it by checking the PPP state as we would like to have done when it
was written.
This commit is contained in:
Sylvain Rochet
2016-08-13 15:56:42 +02:00
parent 4e1f8effaf
commit 4af297fc20
3 changed files with 6 additions and 6 deletions

View File

@@ -620,7 +620,7 @@ void ppp_warn(const char *fmt, ...); /* log a warning message */
void ppp_error(const char *fmt, ...); /* log an error message */
void ppp_fatal(const char *fmt, ...); /* log an error message and die(1) */
#if PRINTPKT_SUPPORT
void ppp_dump_packet(const char *tag, unsigned char *p, int len);
void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len);
/* dump packet to debug log if interesting */
#endif /* PRINTPKT_SUPPORT */