bhyve-webadmin
bhyve-webadmin copied to clipboard
MTU on tap interface is not adjusted
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.
Thank you, I could reproduce the issue so we are going to address this issue in the next release.
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);
}
Work in progress
1.9.0-release