Mpd-4.1 released

Alexander Motin mav at alkar.net
Tue Feb 13 11:53:57 UTC 2007


Andrew Bliznak wrote:
> One more questions.
> a) Device type l2tp (copy pppoe config with changed device type)
> produce INVARIANTS KASSERT in sys/netgraph/ng_l2tp.c on first packet
> from nearest cisco :(

I know about one KASSERT problem in ng_l2tp. I have already sent patches 
to the commiter and waiting for his reply. You can try patch from 
attachment.

> b) Now on exit not cleaned only three nodes:
> ...
>  Name: <unnamed>       Type: pppoe           ID: 00001843   Num hooks: 1

This is current normal behavior. It doesn't usually make any problems.

>  Name: ng0             Type: iface           ID: 00001630   Num hooks: 0
>  Name: ng2             Type: iface           ID: 00000013   Num hooks: 0

This is strange. I think it can be result of using -i parameter at 
bundle creation. Try to not use it.

-- 
Alexander Motin mav at alkar.net
Optima Telecom
-------------- next part --------------
--- 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 @@
 	hpriv->stats.xmitPackets++;
 	hpriv->stats.xmitOctets += m->m_pkthdr.len;
 
+	/* And the global one. */
+	priv->stats.xmitPackets++;
+	priv->stats.xmitOctets += m->m_pkthdr.len;
+
 	/* Send packet */
 	NG_FWD_NEW_DATA(error, item, priv->lower, m);
 	return (error);
@@ -1398,12 +1402,13 @@
 	const priv_p priv = NG_NODE_PRIVATE(node);
 	struct l2tp_seq *const seq = &priv->seq;
 
-	/* Sanity check */
-	L2TP_SEQ_CHECK(seq);
-
 	/* 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;
+	}
 
 	/* Done */
 	L2TP_SEQ_CHECK(seq);
@@ -1420,9 +1425,6 @@
 	struct l2tp_seq *const seq = &priv->seq;
 	struct mbuf *m;
 	u_int delay;
-
-	/* Sanity check */
-	L2TP_SEQ_CHECK(seq);
 
 	/* Make sure peer's ack is still outstanding before doing anything */
 	if (seq->rack == seq->ns)


More information about the freebsd-net mailing list