Author: n_hibma
Date: Thu Oct 25 21:08:31 2012
New Revision: 242098
URL: http://svn.freebsd.org/changeset/base/242098

Log:
  MFC 241496:
  
        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.

Modified:
  stable/8/usr.sbin/ppp/lqr.c
Directory Properties:
  stable/8/usr.sbin/ppp/   (props changed)

Modified: stable/8/usr.sbin/ppp/lqr.c
==============================================================================
--- stable/8/usr.sbin/ppp/lqr.c Thu Oct 25 21:08:02 2012        (r242097)
+++ stable/8/usr.sbin/ppp/lqr.c Thu Oct 25 21:08:31 2012        (r242098)
@@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf
        *      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 &&
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to