diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 85cf484aa36..5ad1fc14b1e 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1220,16 +1220,17 @@ interface recognizes that the parent interface supports insertion and extraction of VLAN tags on its own (usually in firmware) and that it should pass packets to and from the parent unaltered. -.It Fl vlandev Ar iface +.It Fl vlandev Op Ar iface If the driver is a .Xr vlan 4 -pseudo device, disassociate the physical interface -.Ar iface -from it. +pseudo device, disassociate the parent interface from it. This breaks the link between the .Xr vlan 4 interface and its parent, clears its VLAN tag, flags and its link address and shuts the interface down. +The +.Ar iface +argument is useless and hence deprecated. .El .Pp The diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index 493f5261b45..361f415c185 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -130,6 +130,9 @@ unsetvlandev(const char *val, int d, int s, const struct afswtch *afp) { struct vlanreq vreq; + if (val != NULL) + warnx("argument to -vlandev is useless and hence deprecated"); + bzero((char *)&vreq, sizeof(struct vlanreq)); ifr.ifr_data = (caddr_t)&vreq; @@ -148,7 +151,8 @@ unsetvlandev(const char *val, int d, int s, const struct afswtch *afp) static struct cmd vlan_cmds[] = { DEF_CMD_ARG("vlan", setvlantag), DEF_CMD_ARG("vlandev", setvlandev), - DEF_CMD_ARG("-vlandev", unsetvlandev), + /* XXX For compatibility. Should become DEF_CMD() some day. */ + DEF_CMD_OPTARG("-vlandev", unsetvlandev), DEF_CMD("vlanmtu", IFCAP_VLAN_MTU, setifcap), DEF_CMD("-vlanmtu", -IFCAP_VLAN_MTU, setifcap), DEF_CMD("vlanhwtag", IFCAP_VLAN_HWTAGGING, setifcap),