diff options
author | 2015-09-11 15:59:40 +0000 | |
---|---|---|
committer | 2015-09-11 15:59:40 +0000 | |
commit | 8910612b66dd84aa9da1e95679badb52250eb600 (patch) | |
tree | 61ebd0ae8d62adb9221b3bf5776f67df2ed55371 | |
parent | Convert dtls1_send_finished() and ssl3_send_finished() to (diff) | |
download | wireguard-openbsd-8910612b66dd84aa9da1e95679badb52250eb600.tar.xz wireguard-openbsd-8910612b66dd84aa9da1e95679badb52250eb600.zip |
In `ifconfig media` output, stop advertising media with fixed data
rates on wireless interfaces. They are not needed by mere mortals.
ok phessler miod kettenis deraadt mpi
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 906ed5646dd..63f6956f633 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.300 2015/09/11 13:02:59 stsp Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.301 2015/09/11 15:59:40 stsp Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -3048,6 +3048,17 @@ status(int link, struct sockaddr_dl *sdl, int ls) for (type = IFM_NMIN; type <= IFM_NMAX; type += IFM_NMIN) { for (i = 0, printed_type = 0; i < ifmr.ifm_count; i++) { if (IFM_TYPE(media_list[i]) == type) { + + /* + * Don't advertise media with fixed + * data rates for wireless interfaces. + * Normal people don't need these. + */ + if (type == IFM_IEEE80211 && + (media_list[i] & IFM_TMASK) != + IFM_AUTO) + continue; + if (printed_type == 0) { printf("\tsupported media:\n"); printed_type = 1; |