[En-Nut-Discussion] Problem with PPP and NutTCPConnect

Harald Kipp harald.kipp at egnite.de
Fri Jan 30 12:05:37 CET 2004


>
>1. We tried out the PPP implementation over a GPRS link, and found a few
>minor problems.
>With a local provider (Orange-Romania) we found that the magic number option
>request is rejected, but the current implementation of PPP (we used NutOs
>version 3.3.3.1pre from CVS) doesn't recognize the reject properly. (that
>means that the PPP implementation recognizes the reject, but it doesn't send
>out a new request without magic number). We commented out the magic number
>option from the sources (in void LcpTxConfReq(NUTDEVICE *dev, u_char id) )
>and it connected successfully to the network.

I temporarely solved this one by using a hack.

         /*
          * This is a temporary hack. In the initial version
          * we sent the ASYNCMAP only and never expected any
          * rejects. The MAGICNUMBER had been added later
          * to support echo requests, but some servers reject
          * this option. Now we still do not provide full
          * reject processing but blindly assume, that the
          * MAGICNUMBER is the rejected option.
          */
         if (rejected) {
             xcpo = (XCPOPT *) ((char *) xcpo + xcpo->xcpo_len);
             xcpo->xcpo_type = LCP_MAGICNUMBER;
             xcpo->xcpo_len = 6;
             xcpo->xcpo_.ul = dcb->dcb_neg_magic;
         }

I'll commit the update in a few minutes.

(Again we will have too many diff lines, because
the source hadn't been properly formatted. Very
sorry about this, but I still insist on
indent -kr -nut- l 132. Sooner or later we will end
up with a clean format in all files.)


>NutEventWait(&sock->so_ac_tq, 0);
>with
>NutEventWait(&sock->so_ac_tq, 10000); //hang for 10 seconds and give up

This had been suggested several times and always
rejected, because it's a bad solution. The state
machine will continue sending SYNs until the
application finally closes the socket.

I read in ChangeLog, that Oliver reduced the
the retry wait to 6 seconds. This is fine
for local networks but may fail on the Internet.

Anyway, I'd vote for temporarely keeping Oliver's
patch, because everybody seems to be fussy about
connection timeouts.

IMHO, the final solution should be:
Nut/Net TCP/IP doesn't support ICMP messages except
echo requests. It ignores NOROUTE, for example.
If this is implemented, connection timeouts will
be reduced to machines, which are cut from the network.
This can be solved then by adding the ability
to optionally set the number of connection requests.

Harald







More information about the En-Nut-Discussion mailing list