[En-Nut-Discussion] PPP: compression reject, DNS

Harald Kipp harald.kipp at egnite.de
Tue Dec 16 10:57:50 CET 2003


Hi Michel,

>I'm having some difficulties with the LCP layer of the PPP stack.
>It looks like unknown compression protocols are not rejected properly.
>I use a FreeSCO router configured as a dial-in server for my ethernut
>project. The pppd daemon on the FreeSCO router (by default) tries to
>negotiate VJ compression. Ethernut replies with a Configure-Nak but
>pppd says it received a Configure-Reject and shows garbage.

Any chance to log the negotiation telegrams?


>I know a Configure-Reject should always attach the original packet it
>received to the Configure-Reject. Now, I've been trying to understand

Already some time ago I did that code. I think, that
the reject reply should contain rejected items only.

>what happens in the IpcpRxConfReq function but I'm confused. In the
>'Check if there is anything to reject' section the 'xpco' and 'xcpr'
>vars are set to point to the same buffer. Then, if 'len' is not set
>to 0 the original packet is copied in the reply. At least, that is
>what I asumme ;-) But, the code below doesn't seem to copy anything
>as 'xpco' and 'xcpr' point to the same address????:

They point to the same buffer, that's true. But xcpr (pointer)
and xcps (size) are incremented only for rejected items. So
as soon as an item is not rejected, xcpr and xcpo differ.
Finally, if xcps is not equal zero, the original buffer
contains rejected items only in the first xcps bytes.


>B.t.w. I can get PPP to work if I turn off Vjcomp on the server. But
>this is only a test setup before I go out and connect to the big bad ISP's.

There should be an additional option, something like
"allow" or "force" compression.

Anyway, there may be a bug in the Nut PPP code. But
right now I can't see it.



>Another thing I noticed is that although MS-DNS is supported, there
>doesn't seem to a call to NutDnsConfig2 to setup DNS servers? I manually
>added it, but for some reason it doesn't work anyway?

Have a look at the app/pppc sample. There's a comment about this

/*
  * Set name server and default route. Actually the PPP interface
  * should do this, but the current release doesn't.
  */

Harald




More information about the En-Nut-Discussion mailing list