bhyve-webadmin icon indicating copy to clipboard operation
bhyve-webadmin copied to clipboard

MTU on tap interface is not adjusted

Open 0xc0decafe opened this issue 3 years ago • 1 comments

when the physical interface has a mtu != 1500 (9184 in my case) the generated bridge inherits that mtu, but adding the tap interface to the bridge fails, as it has a mtu of 1500. manually adjusting the mtu of the tap interface and adding it to the bridge works.

0xc0decafe avatar May 24 '22 13:05 0xc0decafe

Thank you, I could reproduce the issue so we are going to address this issue in the next release.

DaVieS007 avatar May 24 '22 13:05 DaVieS007

Here is how to get MTU on low level API on FreeBSD. (undocumented)

                    int s = socket(AF_INET, SOCK_DGRAM, 0);
                    if(s >= 0)
                    {
                        struct	ifreq ifr;
                        strlcpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
                        if (ioctl(s, SIOCGIFMTU, &ifr) != -1)
                        {
                            NICS_TMP[tostr(ifa->ifa_name) + "_mtu"] = ifr.ifr_mtu;
                        }
                        else
                        {
                            NICS_TMP[tostr(ifa->ifa_name) + "_mtu"] = 0;
                        }
                        close(s);
                    }

DaVieS007 avatar Sep 02 '22 20:09 DaVieS007

Work in progress

DaVieS007 avatar Sep 02 '22 20:09 DaVieS007

1.9.0-release

DaVieS007 avatar Sep 07 '22 11:09 DaVieS007