Do not increment collision counter if transmit have failed.

Transmission error in tun(4) is queueing error(i.e. ENOBUFS) and it
has nothing to do with collision.

Reported by:	Zeus V Panchenko (zeus <> ibs dot dn dot ua)
This commit is contained in:
Pyun YongHyeon 2011-05-06 20:37:07 +00:00
parent f9de8782aa
commit 26b8066bce

View File

@ -661,10 +661,8 @@ tunoutput(
}
error = (ifp->if_transmit)(ifp, m0);
if (error) {
ifp->if_collisions++;
if (error)
return (ENOBUFS);
}
ifp->if_opackets++;
return (0);
}