Skip to contentSkip to conversation

pppd 2.4.2b3 IPCP converge failure

DISCUSSION Andy 3 participants 4 messages Mar 21, 2004 – Mar 22, 2004 PPP protocol drivers and compressors

lore
Share & tools
lore

Andy

author
#0 lore raw

Can anyone suggest what might have caused this to happen:

Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xae <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xae <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xaf <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xaf <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xb0 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xb0 <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xb1 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xb1 <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xb2 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:56 pppd[24048]: rcvd [IPCP ConfRej id=0xb2 <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:56 pppd[24048]: sent [IPCP ConfReq id=0xb3 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:56 pppd[24048]: rcvd [IPCP ConfRej id=0xb3 <addrs

68.244.143.67 0.0.0.0>]

etc ad infinitum

this appears in the logs of a remote embedded system that connects thru ppp over a wireless link, it went off the air for about an hour today and when it came back its logs were full of this stuff. There's about 5 IPCP ConfReq/ConfRej messages each second. Every 3 seconds there are these additional messages:

Mar 20 18:39:45 pppd[24048]: rcvd [IPCP ConfReq id=0xff <addr
68.28.165.192>]
Mar 20 18:39:45 pppd[24048]: sent [IPCP ConfAck id=0xff <addr

68.28.165.192>]

but although my box acked the new address, it proceeded to ignore it.

Evenually (mercifully!) the peer sent a Term and hung up, my box then reconnected successfully.

The embedded system has limited space for logs, so I have only the last 5 minutes or so of this event, I can't see what happened to start it off.

I'm wondering about the ConfReq packets, what is the second address field doing there (as in addrs 68.244.143.67 0.0.0.0) - that looks wrong to me. And there certainly seems to be a protocol error here in pppd handling the ConfRej's - this is from rfc1661, section 5.4:

Reception of a valid Configure-Reject indicates that when a new Configure-Request is sent, it MUST NOT include any of the Configuration Options listed in the Configure-Reject.

I don't explicitly set the ipcp-max-configure option, so it should have defaulted to 10, according to the manpage, which also states that the ipcp-max-failure option applies to ConfNak's, so presumably the ConfRej's weren't being counted.

This system is running 2.4.2b3, I see that ipcp.c has been updated in 2.4.2, I wonder if this is a known bug. Apologies if it is, but I couldn't find a changelog or anything that describes what's been fixed.

#1 lore raw
Quoted 6 lines · Andy

Can anyone suggest what might have caused this to happen:

Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xae <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xae <addrs

68.244.143.67 0.0.0.0>]

You've cut off the important part of this log -- the one where the peers had initial trouble negotiating IPCP. You'll need to get that part of the log and examine it.

Quoted 2 lines

I'm wondering about the ConfReq packets, what is the second address field doing there (as in addrs 68.244.143.67 0.0.0.0)

This is the old, obsolete IP-Addresses option (see RFC 1332, section 3.1). The only time it's used is when the modern IP-Address option fails. And, yes, pppd is rather insistent on trying to use it when all else fails.

It's just a symptom of some other problem, not a cause, and not necessarily a problem in itself.

At a guess, something went terribly wrong in the initial IPCP negotiation. Does that remote peer properly implement the state machine from RFC 1661?

Signature · 1 line
James Carlson                                  <[email protected]>
author
#2 lore raw
In reply to Andy
Quoted 3 lines · James Carlson

You've cut off the important part of this log -- the one where the peers had initial trouble negotiating IPCP. You'll need to get that part of the log and examine it.

I know. As I mentioned, I only have about 5 minutes of logs, the earlier stuff got overwritten. There's just not enough space on the device to store more. This whole event lasted for about an hour.
If it happens again, I may be able to find a way to save more.

Quoted 9 lines
Quoted 3 lines

I'm wondering about the ConfReq packets, what is the second address field doing there (as in addrs 68.244.143.67 0.0.0.0)

This is the old, obsolete IP-Addresses option (see RFC 1332, section 3.1). The only time it's used is when the modern IP-Address option fails. And, yes, pppd is rather insistent on trying to use it when all else fails.

Quoted 6 lines

It's just a symptom of some other problem, not a cause, and not necessarily a problem in itself.

At a guess, something went terribly wrong in the initial IPCP negotiation. Does that remote peer properly implement the state machine from RFC 1661?

No idea - it's an ISP, I don't know what they're using. However, whether they implement it correctly or not, it seems that pppd does not - it's pretty clear from rfc1661 that just repeating the same configure-request over and over, despite getting a configure-reject, is a protocol violation.

Although it would be useful to know how we got into this state, it's probably more important to fix the code so this endless loop won't happen. I'm not familiar enough with the IPCP FSM as implemented in pppd to be able to do that quickly, I was hoping someone may have done this work already. If not, I'll try to get into the code myself.

#3 lore raw
In reply to Andy
Quoted 8 lines · Andy

I'm wondering about the ConfReq packets, what is the second address field doing there (as in addrs 68.244.143.67 0.0.0.0) - that looks wrong to me. And there certainly seems to be a protocol error here in pppd handling the ConfRej's - this is from rfc1661, section 5.4:

Reception of a valid Configure-Reject indicates that when a new Configure-Request is sent, it MUST NOT include any of the Configuration Options listed in the Configure-Reject.

It looks like the bug is here (line 723 of ipcp.c, in ipcp_cilen):

    if ((wo->neg_addr || wo->old_addrs) && !go->neg_addr && !go->old_addrs) {
        /* use the old style of address negotiation */
        go->old_addrs = 1;
    }

Receiving the conf-reject for the old CI_ADDRS option sets go->old_addrs to 0. Then when we send the next conf-request, this code sets it to 1 again.

I'll have to think about the proper fix here.

Paul.