netlink: fix ipv4 route ignored on darwin

This commit is contained in:
rkonfj
2024-07-16 21:59:18 +08:00
parent 496fd35bae
commit 26bc7fa7d4

View File

@@ -38,10 +38,6 @@ func runReadLoop(fd int, ch chan<- RouteUpdate) error {
if err != nil {
return fmt.Errorf("syscall read: %w", err)
}
if n < 176 {
slog.Warn("Ignore msg with length less than 176", "len", n)
continue
}
msg := buf[:176]
msg[0] = 176
msgs, err := route.ParseRIB(route.RIBTypeRoute, msg)