Merge pull request #114 from slackhq/mtu-optional

Move tun mtu failing to an error log instead of fatal
This commit is contained in:
Nathan Brown 2019-12-18 16:57:40 -08:00 committed by GitHub
commit b39fab3043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,8 @@ func (c Tun) Activate() error {
// Set the MTU on the device
ifm := ifreqMTU{Name: devName, MTU: int32(c.MaxMTU)}
if err = ioctl(fd, unix.SIOCSIFMTU, uintptr(unsafe.Pointer(&ifm))); err != nil {
return fmt.Errorf("failed to set tun mtu: %s", err)
// This is currently a non fatal condition because the route table must have the MTU set appropriately as well
l.WithError(err).Error("Failed to set tun mtu")
}
// Set the transmit queue length