diff options
author | sam <sam@FreeBSD.org> | 2008-03-31 15:38:07 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-03-31 15:38:07 +0000 |
commit | 1cec369535292eab06c22690afab8043336f2e23 (patch) | |
tree | 652d2393cae1d93b05ca165ce9b50c9062f9eeeb /sbin/ifconfig/ifvlan.c | |
parent | 206a6eb6a9859d0eefd10a748c7910492ce7b058 (diff) | |
download | FreeBSD-src-1cec369535292eab06c22690afab8043336f2e23.zip FreeBSD-src-1cec369535292eab06c22690afab8043336f2e23.tar.gz |
Fix handling of create operation together with setting other parameters:
o mark cmds/parameters to indicate they are potential arguments to a clone
operation (e.g. vlantag)
o when handling a create/clone operation do the callback on seeing the first
non-clone cmd line argument so the new device is created and can be used;
and re-setup operating state to reflect the newly created device
Reviewed by: Eugene Grosbein
MFC after: 2 weeks
Diffstat (limited to 'sbin/ifconfig/ifvlan.c')
-rw-r--r-- | sbin/ifconfig/ifvlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index 205ed21..89bc9af 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -172,8 +172,8 @@ DECL_CMD_FUNC(unsetvlandev, val, d) } static struct cmd vlan_cmds[] = { - DEF_CMD_ARG("vlan", setvlantag), - DEF_CMD_ARG("vlandev", setvlandev), + DEF_CLONE_CMD_ARG("vlan", setvlantag), + DEF_CLONE_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), |