summaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2022-02-22 09:55:55 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2022-02-22 09:55:55 +0000
commit21469459e8f18fecaf210b782decd2bb1e72e060 (patch)
tree308dbd592669ac342414902c800e3457739f38c4 /sbin/ifconfig
parentdf1abc908e74a08de0e5c7d8c005b4f053574adc (diff)
don't hide the mtu on "bridge" interfaces.
interfaces like vxlan and nvgre have bridges inside them and respond to bridge ioctls, but they are still interfaces that handle l3 traffic so the mtu means something on them. if we don't want bridge to show an mtu, that can be done by bridge(4) instead of having ifconfig make assumptions like this. noticed by jason tubnor ok deraadt@ claudio@
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 5f901401965..8ee7b194d0b 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.451 2021/11/23 19:13:45 kn Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.452 2022/02/22 09:55:54 dlg Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -1027,11 +1027,7 @@ getinfo(struct ifreq *ifr, int create)
metric = 0;
else
metric = ifr->ifr_metric;
-#ifdef SMALL
if (ioctl(sock, SIOCGIFMTU, (caddr_t)ifr) == -1)
-#else
- if (is_bridge() || ioctl(sock, SIOCGIFMTU, (caddr_t)ifr) == -1)
-#endif
mtu = 0;
else
mtu = ifr->ifr_mtu;