NetBSD Problem Report #41559

From hag@linnaean.org  Mon Jun  8 17:56:28 2009
Return-Path: <hag@linnaean.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 535C863B8B4
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  8 Jun 2009 17:56:28 +0000 (UTC)
Message-Id: <20090608175624.71F52A847@perdition.linnaean.org>
Date: Mon,  8 Jun 2009 13:56:24 -0400 (EDT)
From: hag@linnaean.org
Reply-To: Daniel Hagerty <hag@linnaean.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: No output byte accounting in if_stf (6to4)
X-Send-Pr-Version: 3.95

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 08 18:00:00 +0000 2009
>Closed-Date:    Sat Dec 31 22:03:26 +0000 2011
>Last-Modified:  Sat Dec 31 22:03:26 +0000 2011
>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:/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);
 }

>Release-Note:

>Audit-Trail:
From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41559 CVS commit: src/sys/net
Date: Sun, 8 Nov 2009 13:44:46 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Sun Nov  8 18:44:46 UTC 2009

 Modified Files:
 	src/sys/net: if_stf.c

 Log Message:
 PR/42285: PR/41559: Daniel Hagerty: if_stf doesn't count output bytes


 To generate a diff of this commit:
 cvs rdiff -u -r1.72 -r1.73 src/sys/net/if_stf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: riz@NetBSD.org
State-Changed-When: Sat, 31 Dec 2011 22:03:26 +0000
State-Changed-Why:
Fix was applied 2y ago.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.