On 8/4/2016 6:30 PM, Sylvain Rochet wrote:
Hello,
On Thu, Aug 04, 2016 at 10:15:56AM -0400, Patrick Klos wrote:
Again, the TermReq packet is an LCP packet. If your peer is ignoring
all LCP packets (as you stated earlier), it's just ignore that packet
as well. I'm sure you could find a way to get LwIP to send the packet
- just not sure if it'll help given your symptoms.
The issue here is probably a LCP magic (=cookie) mismatch. Once a LCP
session negotiated the magic, which is usually the first thing it
negotiates, it only accept LCP packets with the magic set.
That's not how the Magic-Number option is used. The Magic-Number is
primarily used to detect when the link is (or becomes) looped back. If
the sender receives an LCP Configure-Request (or other LCP packets which
explicitly include the Magic-Number) with the it's own Magic-Number,
it's safe to assume the link is in some kind of loopback mode. You can
get the full explanation in RFC 1661, but you get the idea.
Once negotiated, the value set by the Magic-Number option is used in LCP
Echo-Request, LCP Echo-Reply, LCP Discard-Request, and some
Quality-Protocol packets, but none of the other LCP packets (unless
negotiations start over).
It means sending the TermReq packet with a new random magic is not going
to work anyway, this is what the magic is for actually, to protect the
LCP channel for outsiders, hey ;-)
The Terminate-Request does not have a Magic-Number in it. You can send
it at any time and the peer's LCP state is required to drop out of the
Opened state.
Greg, please use LCP echo request/reply mechanism, that's the only
viable solution. I hope you can configure LCP request/reply interval and
count timeout on the PPP peer.
At this point, I think a packet (or byte) trace is the best diagnostic
to show what's happening here.
Patrick Klos
Laufer Wind
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users