diff --git a/monitor_android.go b/monitor_android.go index 2d6f183..735dab9 100644 --- a/monitor_android.go +++ b/monitor_android.go @@ -2,6 +2,7 @@ package tun import ( "github.com/sagernet/netlink" + E "github.com/sagernet/sing/common/exceptions" ) func (m *defaultInterfaceMonitor) checkUpdate() error { @@ -18,7 +19,7 @@ func (m *defaultInterfaceMonitor) checkUpdate() error { } if defaultTableIndex == 0 { - return ErrNoRoute + return E.Extend(ErrNoRoute, "no rule 0xFFFF") } routes, err := netlink.RouteListFiltered(netlink.FAMILY_ALL, &netlink.Route{Table: defaultTableIndex}, netlink.RT_FILTER_TABLE) @@ -46,5 +47,5 @@ func (m *defaultInterfaceMonitor) checkUpdate() error { return nil } - return ErrNoRoute + return E.Extend(ErrNoRoute, "no route in default table ", defaultTableIndex) }