kern/82189: [patch] ng_fec interface - problems with counting input bytes

Stikheev Andrew sand at zunet.ru
Mon Jun 13 08:00:47 GMT 2005


>Number:         82189
>Category:       kern
>Synopsis:       [patch] ng_fec interface - problems with counting input bytes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 13 08:00:42 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Stikheev Andrew
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD sand.zuzino.mipt.ru 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sun Jun 12 02:16:10 MSD 2005 sand at sand.zuzino.mipt.ru:/usr/obj/usr/src/sys/MYKERNEL i386


	
>Description:
On fec interface number of input bytes  == 2 * real input bytes.
On interfaces in a bundle input bytes are zero all time.
>How-To-Repeat:
	
>Fix:
--- ng_fec.c    Mon Jun 13 10:24:25 2005
+++ ng_fec.c.new        Mon Jun 13 11:01:31 2005
@@ -815,7 +815,7 @@ ng_fec_input(struct ifnet *ifp, struct m
        /* Convince the system that this is our frame. */
        m0->m_pkthdr.rcvif = bifp;
        bifp->if_ipackets++;
-       bifp->if_ibytes += m0->m_pkthdr.len + sizeof(struct ether_header);
+       ifp->if_ibytes += m0->m_pkthdr.len;
 
        (*bifp->if_input)(bifp, m0);

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list