Account for packets we clean out when we disconnect.

This commit is contained in:
Poul-Henning Kamp 2000-07-03 13:08:56 +00:00
parent 9282307a5d
commit a5b5959dc8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62467

View File

@ -706,8 +706,10 @@ ngmn_disconnect(hook_p hook)
/* Free all transmit descriptors and mbufs */
for (dp = sc->ch[chan]->x1; dp ; dp = dp2) {
if (dp->m)
if (dp->m) {
sc->ch[chan]->tx_pending -= dp->m->m_pkthdr.len;
m_freem(dp->m);
}
sc->ch[chan]->x1 = dp2 = dp->vnext;
mn_free_desc(dp);
}