bthnycl / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
0 stars 0 forks source link

[patch] PPP's LCP state machine fails to run timer #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[Note: this is pretty low priority, it should be extremely rare to encounter 
"in the wild"]

On rare occasions the PPP stack gets stuck and fails to bring up the PPP link. 
We don't have an easy, reliable way to reproduce it as it only shows up when 
the Linux-side PPP daemon is raced. After a lot of data collection, staring at 
code and reading the RFC, we finally narrowed it down to this:

"The LCP state machine failed to run the timeout timer while in ack-received 
state, which could result in the state machine getting stuck in ack-received 
state rather than falling back to req-sent (after sending a conf req). To 
actually get the device into the ack-received state without sending the conf 
req is very hard however. It appears to only be possible when the device resets 
half-way through establishing the PPP connection. This does happen during 
flashing (boot loader installation, and provisioning), but even so, the timing 
has to be exact to drop the LCP state machine into the problematic state."

The attached patch introduces another action (TA_startRestartTimer) and flags 
it when going into LAS_AckReceived state. Normally the restart timer is started 
after a frame has been sent, but on entering ack-received state there is no 
frame triggered, and hence the timer has not been restarted.

Original issue reported on code.google.com by jmatts...@dius.com.au on 21 Feb 2012 at 5:43

Attachments: