NetBSD Problem Report #34276

From  Thu Aug 24 18:59:59 2006
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 82A6763B8F2
	for <>; Thu, 24 Aug 2006 18:59:59 +0000 (UTC)
Message-Id: <>
Date: Thu, 24 Aug 2006 19:11:20 +0200 (MEST)
Subject: inconsistent code in ether_input()
X-Send-Pr-Version: 3.95

>Number:         34276
>Category:       kern
>Synopsis:       ether_input() refernces ec_nvlans inconsitently
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 24 19:00:01 +0000 2006
>Originator:     Christoph Badura
>Release:        NetBSD 3.0_STABLE


System: NetBSD limiting-factor 3.0_STABLE NetBSD 3.0_STABLE (GENERIC_LAPTOP) #1: Fri Aug 11 00:20:07 MEST 2006 root@limiting-factor:/u/2/obj/u/1/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386

sys/net/if_ethersubr.c contains the following lines in ether_input():

if (ec->ec_nvlans && m_tag_find(m, PACKET_TAG_VLAN, NULL) != NULL) {

and right after that:

if (((struct ethercom *)ifp)->ec_nvlans != 0)

Only one of these lines can be correct because ifp may have been modified
after assigning ec by the bridge code.

I haven't looked at other parts of the code for similar errors.


code inspection

not sure. maybe recompute "ec" in the bridge case.


NetBSD Home
NetBSD PR Database Search

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