Kaynağa Gözat

vxlan: error on sysctl fail

Stefan Junker 8 yıl önce
ebeveyn
işleme
62ed90ec33
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      backend/vxlan/device.go

+ 3 - 1
backend/vxlan/device.go

@@ -71,7 +71,9 @@ func newVXLANDevice(devAttrs *vxlanDeviceAttrs) (*vxlanDevice, error) {
 	}
 	// this enables ARP requests being sent to userspace via netlink
 	sysctlPath := fmt.Sprintf("/proc/sys/net/ipv4/neigh/%s/app_solicit", devAttrs.name)
-	sysctlSet(sysctlPath, "3")
+	if err := sysctlSet(sysctlPath, "3"); err != nil {
+		return nil, err
+	}
 
 	return &vxlanDevice{
 		link: link,