NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/41559: No output byte accounting in if_stf (6to4)



>Number:         41559
>Category:       kern
>Synopsis:       No output byte accounting in if_stf (6to4)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 08 18:00:00 +0000 2009
>Originator:     Daniel Hagerty
>Release:        NetBSD 4.0.1_PATCH
>Organization:
        
>Environment:
        
        
System: NetBSD perdition.linnaean.org 4.0.1_PATCH NetBSD 4.0.1_PATCH 
(PERDITION) #3: Mon Jun 8 12:39:31 EDT 2009 
root%yall.linnaean.org@localhost:/usr/src/sys/arch/i386/compile/PERDITION i386
Architecture: i386
Machine: i386
>Description:
        The stf (6to4) interface doesn't have any output byte
accounting, by apparent omission.
>How-To-Repeat:
        Setup a 6to4 tunnel, and observe how the Obytes counter from
"netstat -bnI stf0" never changes.
>Fix:
        Patch for sys/net/if_stf.c vs netbsd-4-0 tree from sometime in
the last few months:

--- sys/net/if_stf.c.orig       2006-11-15 20:33:40.000000000 -0500
+++ sys/net/if_stf.c    2009-06-08 13:52:44.000000000 -0400
@@ -439,6 +439,7 @@
        }
 
        ifp->if_opackets++;
+       ifp->if_obytes += m->m_pkthdr.len - sizeof(struct ip);
        return ip_output(m, NULL, &sc->sc_ro, 0,
            (struct ip_moptions *)NULL, (struct socket *)NULL);
 }

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index