diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2012-10-12 22:48:33 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2012-10-12 22:48:33 +0000 |
commit | 5f97c24afc27a3ac942ab681669a6aab0e6cc5d1 (patch) | |
tree | d6cc977a4cc199a74c42906353ea56075eec5aed /usr.sbin/ppp | |
parent | 2db2a2f9c6eceb762ca71f0fd7f226f6bdb5e0d0 (diff) | |
download | FreeBSD-src-5f97c24afc27a3ac942ab681669a6aab0e6cc5d1.zip FreeBSD-src-5f97c24afc27a3ac942ab681669a6aab0e6cc5d1.tar.gz |
Some 3G modems return the wrong signature in echo packets and make it
impossible to use LQR/ECHO. They return want_magic instead.
With this change it is now possible to use
enable lqr
set lqrperiod 5
enable echo
set echoperiod 5
in your ppp.conf file.
MFC after: 3 days
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/lqr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c index 7aca17a..7ce1513 100644 --- a/usr.sbin/ppp/lqr.c +++ b/usr.sbin/ppp/lqr.c @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf *bp) * die as a result. */ } - if (lqr.signature == SIGNATURE) { + if (lqr.signature == SIGNATURE + || lqr.signature == lcp->want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc->lqm.echo.seq_recv > (u_int32_t)0 - 5 && lqr.sequence < 5) || (hdlc->lqm.echo.seq_recv <= (u_int32_t)0 - 5 && |