From 15d176e9a854fd978892d763385d10dbe7141b05 Mon Sep 17 00:00:00 2001 From: dlg Date: Tue, 22 Feb 2022 09:55:54 +0000 Subject: [PATCH] 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@ --- sbin/ifconfig/ifconfig.c | 6 +----- 1 file changed, 1 insertion(+), 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; -- 2.20.1