Bug in userland PPP LQR?
brett at lariat.net
Wed Jul 11 00:42:48 UTC 2007
I may have found a bug in the LQR code of FreeBSD's userland PPP.
I've been noticing that PPTP sessions are dropping with messages
saying "** Too many LQR packets lost **" on some important wireless
links. Wireless links occasionally do drop a packet or two, but
it's rare to see 5 dropped packets in a row (which is supposed to
be when PPP gives up and kills the link). Yet, the links go down
when there's even an occasional dropped packet.
I'm using LQR with an interval of 12 seconds, and the built-in
threshold for dropping the connection (not changeable in this
implementation) is 5 lost packets. This means that the link pretty
much has to be down for 60 seconds before the connection gets cut off.
In practice, however, connections are dying when data was coming
through only a few seconds before and there's a very low percentage
of dropped packets. This leads me to suspect that either (a) the
lost packet counter is cumulative for the session; that is, it's
not resetting when a good response comes in; or (b) the LQR
mechanism it may be getting out of sync (perhaps due to unexpected
sequence numbers) and always count up to 5 after the first missed packet.
The code in /usr/src/usr.sbin/ppp/lqr.c is quite cryptic, and I'd
like some help in figuring out just why I'm seeing so many dropped
connections due to LQR. Any folks out there willing to help me analyze it?
More information about the freebsd-net