Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2012 22:48:33 +0000 (UTC)
From:      Nick Hibma <n_hibma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241496 - head/usr.sbin/ppp
Message-ID:  <201210122248.q9CMmXHq090087@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: n_hibma
Date: Fri Oct 12 22:48:33 2012
New Revision: 241496
URL: http://svn.freebsd.org/changeset/base/241496

Log:
  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

Modified:
  head/usr.sbin/ppp/lqr.c

Modified: head/usr.sbin/ppp/lqr.c
==============================================================================
--- head/usr.sbin/ppp/lqr.c	Fri Oct 12 22:06:06 2012	(r241495)
+++ head/usr.sbin/ppp/lqr.c	Fri Oct 12 22:48:33 2012	(r241496)
@@ -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 &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210122248.q9CMmXHq090087>