rl(4): Fix an old typo
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 2 Jun 2011 01:26:00 +0000 (09:26 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 2 Jun 2011 01:26:00 +0000 (09:26 +0800)
If receiving buffer wrapping happens, the first size of copy should be the
size of the buffer at the end of the receiving buffer.

DragonFly-Bug: http://bugs.dragonflybsd.org/issue2083

sys/dev/netif/rl/if_rl.c

index 9663a3d..bc90a70 100644 (file)
@@ -1054,7 +1054,7 @@ rl_rxeof(struct rl_softc *sc)
                         * the data.
                         */
                        m = m_devget(rxbufpos - RL_ETHER_ALIGN,
-                           total_len + RL_ETHER_ALIGN, 0, ifp, NULL);
+                           wrap + RL_ETHER_ALIGN, 0, ifp, NULL);
                        if (m == NULL) {
                                ifp->if_ierrors++;
                        } else {