In ep_if_start(), restore 'm' after it is used to traverse mbufs, or following
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 28 Jan 2006 14:05:57 +0000 (14:05 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 28 Jan 2006 14:05:57 +0000 (14:05 +0000)
code's assumption is broken.

Reported-and-Tested-by: swildner
sys/dev/netif/ep/if_ep.c

index ddb6e03..0f12176 100644 (file)
@@ -39,7 +39,7 @@
 
 /*
  * $FreeBSD: src/sys/dev/ep/if_ep.c,v 1.95.2.3 2002/03/06 07:26:35 imp Exp $
- * $DragonFly: src/sys/dev/netif/ep/if_ep.c,v 1.23 2005/12/11 01:54:08 swildner Exp $
+ * $DragonFly: src/sys/dev/netif/ep/if_ep.c,v 1.24 2006/01/28 14:05:57 sephe Exp $
  *
  *  Promiscuous mode added and interrupt logic slightly changed
  *  to reduce the number of adapter failures. Transceiver select
@@ -446,6 +446,7 @@ startagain:
 
     for (len = 0, top = m; m; m = m->m_next)
        len += m->m_len;
+    m = top;
 
     pad = padmap[len & 3];