mirror of
https://github.com/sigcn/pg.git
synced 2025-10-30 04:51:44 +08:00
netlink: fix ipv4 route ignored on darwin
This commit is contained in:
@@ -38,10 +38,6 @@ func runReadLoop(fd int, ch chan<- RouteUpdate) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("syscall read: %w", err)
|
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 := buf[:176]
|
||||||
msg[0] = 176
|
msg[0] = 176
|
||||||
msgs, err := route.ParseRIB(route.RIBTypeRoute, msg)
|
msgs, err := route.ParseRIB(route.RIBTypeRoute, msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user