Browse Source

Move tun mtu failing to an error log instead of fatal

Nate Brown 5 năm trước cách đây
mục cha
commit
55525654a8
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      tun_linux.go

+ 2 - 1
tun_linux.go

@@ -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