On Tue, Feb 22, 2022 at 03:46:05PM +1000, David Gwynne wrote: > this lets ifconfig show the MTU on interfaces like nvgre, vxlan, etc. > they currently don't show it because they also implement a bridge ioctl, > so ifconfig thinks they're a bridge. > > why ifconfig hides the mtu on bridges looks to be a hold over from when > brconfig was merged into ifconfig. if we dont want bridge(4) to report > an mtu, then i can make bridge(4) itself hide the mtu or stop setting > the mtu. > > found by jason tubnor. > > ok? > > Index: ifconfig.c > =================================================================== > RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v > retrieving revision 1.451 > diff -u -p -r1.451 ifconfig.c > --- ifconfig.c 23 Nov 2021 19:13:45 -0000 1.451 > +++ ifconfig.c 22 Feb 2022 05:38:48 -0000 > @@ -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; >
OK claudio@ -- :wq Claudio