[En-Nut-Discussion] PPP Fixes (again)
Mike Cornelius
mikec at call-direct.com.au
Fri May 14 01:34:49 CEST 2004
Hi All,
I have found (and I think others have in the past) that in certain
circumstances PPP fails to negotiate.
I have tracked one bug down to the fact that in lcpin.c and icmpin.c if
the currrent option being rejected
or NAK'd is longer than the total of earlier rejected / NAK'd options
the copy operation stomps on important data (the option length) and then
uses that data later.
I think Michel Hendriks submitted a fix for this a while back but I
thought it was a little complicated (no offense Michael :) ).
(Actually I don't care which fix makes it in so long as one of them
does).
I've found the following works well :-
Relpace:-
if (len) {
if (xcpr != xcpo) {
xcpr->xcpo_type = xcpo->xcpo_type;
xcpr->xcpo_len = len;
}
xcpr = (XCPOPT *) ((char *) xcpr + len);
xcps += len;
len = 0;
}
xcpl -= xcpo->xcpo_len;
xcpo = (XCPOPT *) ((char *) xcpo + xcpo->xcpo_len);
With:-
sval = xcpo->xcpo_len;
if (len) {
if (xcpr != xcpo) {
xcpr->xcpo_type = xcpo->xcpo_type;
xcpr->xcpo_len = len;
}
xcpr = (XCPOPT *) ((char *) xcpr + len);
xcps += len;
len = 0;
}
xcpl -= sval;
xcpo = (XCPOPT *) ((char *) xcpo + sval);
In lcpin.c and ipcpin.c, in total there are 4 places this needs to be
changed (twice in each file).
This is a particular problem when connecting to MS servers.
Regards,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
Mike Cornelius Internet: mikec at call-direct.com.au
Call Direct Cellular Solutions Phone: +61 2 9209-4259
Suite 145 FAX: +61 2 9209-4196
National Innovation Centre URL: http://www.call-direct.com.au
<http://www.call-direct.com.au/>
Australian Technology Park
Eveleigh NSW 1430
Australia
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040514/b6b912d5/attachment-0001.html>
More information about the En-Nut-Discussion
mailing list