From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 13 12:40:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A602106566B for ; Fri, 13 Feb 2009 12:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4558FC0C for ; Fri, 13 Feb 2009 12:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1DCe1Y0058056 for ; Fri, 13 Feb 2009 12:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1DCe10C058055; Fri, 13 Feb 2009 12:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 13 Feb 2009 12:40:01 GMT Resent-Message-Id: <200902131240.n1DCe10C058055@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitrij Tejblum Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED7211065670 for ; Fri, 13 Feb 2009 12:30:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 808ED8FC0A for ; Fri, 13 Feb 2009 12:30:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1DCUiPI048542 for ; Fri, 13 Feb 2009 12:30:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n1DCUiVM048541; Fri, 13 Feb 2009 12:30:44 GMT (envelope-from nobody) Message-Id: <200902131230.n1DCUiVM048541@www.freebsd.org> Date: Fri, 13 Feb 2009 12:30:44 GMT From: Dmitrij Tejblum To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/131642: [patch] [if_vlan] Incorrect handling of mistakes in vlan creation X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 12:40:01 -0000 >Number: 131642 >Category: kern >Synopsis: [patch] [if_vlan] Incorrect handling of mistakes in vlan creation >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: Fri Feb 13 12:40:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitrij Tejblum >Release: FreeBSD 7.1-STABLE >Organization: OOO Yandex >Environment: >Description: >How-To-Repeat: # # (Assume there is no vlan configured) # ifconfig vlan10 create vlan 10 vlandev em0 # ifconfig vlan11 create vlan 10 vlandev em0 ifconfig: SIOCIFCREATE2: File exists # # (Ok, that was mistake in vlan tag) # ifconfig vlan11 create vlan 11 vlandev em0 ifconfig: SIOCIFCREATE2: File exists # # Huh??? >Fix: Patch attached with submission follows: --- sys/net/if_vlan.c 2009-02-12 19:06:08.000000000 +0300 +++ sys/net/if_vlan.c 2009-02-13 15:18:27.000000000 +0300 @@ -742,6 +742,7 @@ ether_ifdetach(ifp); vlan_unconfig(ifp); if_free_type(ifp, IFT_ETHER); + ifc_free_unit(ifc, unit); free(ifv, M_VLAN); return (error); >Release-Note: >Audit-Trail: >Unformatted: