diff options
author | 2018-11-14 21:25:04 +0000 | |
---|---|---|
committer | 2018-11-14 21:25:04 +0000 | |
commit | 12eb302eec8113f6de902a931ee7a59de2e6d6bc (patch) | |
tree | 20197296196deb80a43fa1bbfd8064932ec81b9e | |
parent | Record an inter-library dependency on libcurses in libedit and libreadline, (diff) | |
download | wireguard-openbsd-12eb302eec8113f6de902a931ee7a59de2e6d6bc.tar.xz wireguard-openbsd-12eb302eec8113f6de902a931ee7a59de2e6d6bc.zip |
Warn on deprecated 'vlan' and 'vlandev' option usage
These were superseeded by 'vnetid' and 'parent' in june 2017 and will be
removed in the future.
"Looks right" deraadt, OK benno
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 01da5acbe29..5f67bbdb7ef 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.382 2018/11/12 23:40:37 dlg Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.383 2018/11/14 21:25:04 kn Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -4098,6 +4098,8 @@ setvlantag(const char *val, int d) struct vlanreq vreq; const char *errmsg = NULL; + warnx("The 'vlan' option is deprecated, use 'vnetid'"); + __tag = tag = strtonum(val, EVL_VLID_MIN, EVL_VLID_MAX, &errmsg); if (errmsg) errx(1, "vlan tag %s: %s", val, errmsg); @@ -4124,6 +4126,8 @@ setvlandev(const char *val, int d) size_t skip; const char *estr; + warnx("The 'vlandev' option is deprecated, use 'parent'"); + bzero((char *)&vreq, sizeof(struct vlanreq)); ifr.ifr_data = (caddr_t)&vreq; @@ -4151,6 +4155,8 @@ unsetvlandev(const char *val, int d) { struct vlanreq vreq; + warnx("The '-vlandev' option is deprecated, use '-parent'"); + bzero((char *)&vreq, sizeof(struct vlanreq)); ifr.ifr_data = (caddr_t)&vreq; |