cvs commit: src/sbin/ifconfig ifconfig.c

Sam Leffler sam at freebsd.org
Thu Oct 2 16:24:32 UTC 2008


Ed Schouten wrote:
> Hello Sam,
>
> * Sam Leffler <sam at FreeBSD.org> 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

-------------- next part --------------
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),


More information about the cvs-src mailing list