Mpd-4.1 released
Alexander Motin
mav at alkar.net
Tue Feb 13 14:42:58 UTC 2007
Bjoern A. Zeeb wrote:
> --- ng_l2tp.c.orig Sat Feb 10 06:58:03 2007
> +++ ng_l2tp.c Sat Feb 10 06:58:00 2007
> @@ -1121,6 +1121,10 @@
>
> /* If ack is still outstanding, send a ZLB */
> - if (seq->xack != seq->nr)
> + if (seq->xack != seq->nr) {
> ng_l2tp_xmit_ctrl(priv, NULL, seq->ns);
> + /* If there was memory error, ignore it.
> + We must keep state consistent here. */
> + seq->xack = seq->nr;
> + }
>
> This change is not needed. ng_l2tp_xmit_ctrl() does this already.
It does this usually. But in case of no free mbufs it does not. Usually
it's ok. But in this case it will lead to assertion in next check. The
other way is to schedule next timeout, but in lack of system resources
it can be better to just skip this packet.
> It's not a good idea to remove the L2TP_SEQ_CHECK()s.
It is _incorrect_ to call it there. When ng_l2tp_seq_xack_timeout()
called callout_pending() function will already return FALSE because of
timeout already ended. But at this moment action is not actually done
and seq->xack != seq->nr. This leads to KASSERT without any reason.
> Been there years ago but seems I missed to get this fixed
> in the FreeBSD repo.
> The problem is in ng_l2tp_seq_check(). Fix it there.
Problem is not there! ng_l2tp_seq_check() works correctly from it's
point of view.
--
Alexander Motin mav at alkar.net
Optima Telecom
More information about the freebsd-net
mailing list