[En-Nut-Discussion] PPP/AHDLC logic problems...
Vesa Jääskeläinen
chaac at nic.fi
Sun Apr 17 00:23:54 CEST 2005
Brett Abbott wrote:
> Vesa, Harald
>
> I think this is the same problem already resolved by Eduardo Serantes
> but not released formally into NutOS. He published his patch on 14th
> Jan 2005 to this discussion group for review. Have a look at this, it
> is quite thorough.
But that patch doesn't solve all problems in there. Additional
initialization is a good thing there after connection.
This code however is a bit odd:
----
/* Added by Edu */
if (nb) {
NutHeapFree(nb);
nb=0;
}
/* End */
----
Shouldn't "(*ifn->if_recv) (netdev, nb)" handle all free's ? If it
doesn't then there is bug elsewhere.
There seems to be same fix for exiting loop. But other problems remains
there that I was talking about. I am little worried about the fact that
sometimes if I do HDLC_SETIFNET with value 0, it will reboot whole system.
> Ernst Stippl, Eduardo and I have tested this and in the words of Ernst
> (Jan 27), "In my opinion, it should be released".
Most parts of the modifications is OK in my opinion, but it still needs
more work elsewhere.
> I suspect there is still a minor memory leak associated with closing PPP
> (which was there since ppp was first release) surrounding routes not
> being removed - only an issue if you open and close it alot.
Hmm... Perhaps I need to "reverse engineer" that state machine to debug
more these problems.
> Im working (slowly) on a small mod to allow you to suspend PPP to issue
> short AT commands without disconnecting the PPP session but this isnt
> related to your issue.
This is probably a good idea, but about that MUX case, I think separate
driver for it would be a better idea than using hack after a hack :).
But real option for pausing PPP would still be needed.
Thanks,
Vesa Jääskeläinen
More information about the En-Nut-Discussion
mailing list