Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2009 12:30:44 GMT
From:      Dmitrij Tejblum <tejblum@yandex-team.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/131642: [patch] [if_vlan] Incorrect handling of mistakes in vlan creation
Message-ID:  <200902131230.n1DCUiVM048541@www.freebsd.org>
Resent-Message-ID: <200902131240.n1DCe10C058055@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902131230.n1DCUiVM048541>