Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2011 20:37:07 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221548 - head/sys/net
Message-ID:  <201105062037.p46Kb7AT065078@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Fri May  6 20:37:07 2011
New Revision: 221548
URL: http://svn.freebsd.org/changeset/base/221548

Log:
  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)

Modified:
  head/sys/net/if_tun.c

Modified: head/sys/net/if_tun.c
==============================================================================
--- head/sys/net/if_tun.c	Fri May  6 20:04:47 2011	(r221547)
+++ head/sys/net/if_tun.c	Fri May  6 20:37:07 2011	(r221548)
@@ -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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105062037.p46Kb7AT065078>