Subject: pppd changes
To: current-users Mailing list <current-users@NetBSD.ORG>
From: Bjoern Labitzke <hermit@labitzke.isdn.cs.tu-berlin.de>
List: current-users
Date: 05/25/1998 17:32:29
Hello...
Some time ago (May, 2nd according to the file checkin date)
src/usr.sbin/pppd/pppd/lcp.c got changed. Since then I have been unable to
connect to my provider correctly. The connection was established, sending
of data seemed to work, as the modem seemed to report answers (e.g. for
pings). The problem was, that no data came through the pppd back to th
system. So I didn't get ping-answers or anything else to see. I used an
old version of pppd to circumvent the problem. A few minutes ago I
stumbled across that problem again as I did another build. So I looked for
the problem and found the offending changes. Since May 2nd quite some time
has gone by and no other persons seem to experience that problem, so I
describe it here first, but will send-pr it, if needed.
I have to point out, that I didn't try to understand the problem really, I
just backed out the most probable part and I found it to work again. Here
is the diff:
--------- snip ---------
--- lcp.c.old Mon May 25 17:17:55 1998
+++ lcp.c Mon May 25 17:20:44 1998
@@ -273,7 +273,7 @@
*/
ppp_set_xaccm(unit, xmit_accm[unit]);
ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0);
- ppp_recv_config(unit, PPP_MRU, 0xffffffff,
+ ppp_recv_config(unit, PPP_MRU, 0x00000000,
wo->neg_pcompression, wo->neg_accompression);
peer_mru[unit] = PPP_MRU;
lcp_allowoptions[unit].asyncmap = xmit_accm[unit][0];
@@ -1491,8 +1491,13 @@
ppp_send_config(f->unit, MIN(ao->mru, (ho->neg_mru? ho->mru: PPP_MRU)),
(ho->neg_asyncmap? ho->asyncmap: 0xffffffff),
ho->neg_pcompression, ho->neg_accompression);
+ /*
+ * If the asyncmap hasn't been negotiated, we really should
+ * set the receive asyncmap to ffffffff, but we set it to 0
+ * for backwards contemptibility.
+ */
ppp_recv_config(f->unit, (go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU),
- (go->neg_asyncmap? go->asyncmap: 0xffffffff),
+ (go->neg_asyncmap? go->asyncmap: 0x00000000),
go->neg_pcompression, go->neg_accompression);
if (ho->neg_mru)
@@ -1521,7 +1526,7 @@
ppp_send_config(f->unit, PPP_MRU, 0xffffffff, 0, 0);
ppp_recv_config(f->unit, PPP_MRU,
- (go->neg_asyncmap? go->asyncmap: 0xffffffff),
+ (go->neg_asyncmap? go->asyncmap: 0x00000000),
go->neg_pcompression, go->neg_accompression);
peer_mru[f->unit] = PPP_MRU;
}
-------- snip -----------
Thanks in advance...
--
Bjoern Labitzke | E-Mail: hermit@cs.tu-berlin.de
PGP-Key available | Use PGP! Or don't you use envelopes for your letters?