From owner-cvs-all@FreeBSD.ORG Thu Oct 2 16:24:32 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62BBC1065693; Thu, 2 Oct 2008 16:24:32 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 145B08FC0C; Thu, 2 Oct 2008 16:24:32 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m92GOEJP039441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Oct 2008 09:24:14 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48E4F5AE.9050202@freebsd.org> Date: Thu, 02 Oct 2008 09:24:14 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Ed Schouten References: <200809291627.m8TGRaat081340@repoman.freebsd.org> <20081002122511.GW16837@hoeg.nl> In-Reply-To: <20081002122511.GW16837@hoeg.nl> Content-Type: multipart/mixed; boundary="------------020505000705030502090301" X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sbin/ifconfig ifconfig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 16:24:32 -0000 This is a multi-part message in MIME format. --------------020505000705030502090301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Ed Schouten wrote: > Hello Sam, > > * Sam Leffler wrote: > >> sam 2008-09-29 16:27:32 UTC >> >> FreeBSD src repository >> >> Modified files: >> sbin/ifconfig ifconfig.c >> Log: >> SVN rev 183466 on 2008-09-29 16:27:32Z by sam >> >> Distinguish between cmd/parameters used for clone operations and >> all others. Use this to disambiguate cmd line arguments that can >> be either clone params or regular parameters so, in particular, >> "bssid" again works as a regular parameter. >> >> While here leverage the above to improve the logic for flushing >> clone operations on the first !clone cmd line parameter. >> >> Reviewed by: jhay >> > > Is it possible that this commit broke `ifconfig foo vlan bar vlandev baz'? > I just had to revert to an ifconfig, probably from September 22, to make > my system work properly again. > > Try the attached patch. It's probably better to split the callback routines into clone+!clone variants but for now this should fix your usage. I'd actually like to see vlan state be fixed for the life of the ifnet and do away with this usage but that wasn't the intent here. Sam --------------020505000705030502090301 Content-Type: text/plain; name="vlan.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vlan.patch" Index: ifvlan.c =================================================================== --- ifvlan.c (revision 183550) +++ ifvlan.c (working copy) @@ -174,6 +174,9 @@ static struct cmd vlan_cmds[] = { DEF_CLONE_CMD_ARG("vlan", setvlantag), DEF_CLONE_CMD_ARG("vlandev", setvlandev), + /* NB: non-clone cmds */ + DEF_CMD_ARG("vlan", setvlantag), + DEF_CMD_ARG("vlandev", setvlandev), /* XXX For compatibility. Should become DEF_CMD() some day. */ DEF_CMD_OPTARG("-vlandev", unsetvlandev), DEF_CMD("vlanmtu", IFCAP_VLAN_MTU, setifcap), --------------020505000705030502090301--