Commit e0e2249
committed
fix(netwatch): detect IPv6 default routes on Linux
default_route() reads /proc/net/route first, which contains only IPv4
entries. When no IPv4 default route exists it returns Ok(None), and the
code treated any Ok result as final without falling through to the
netlink-based detection that handles both address families.
On a v6-only network this made default_route_interface permanently
None, which caused iroh's has_usable_network() to return false after
network switches. The 5-second debounce timeout would expire before
the QUIC stack learned about the change, leaving connections stuck on
dead paths.
The fix narrows the early return to Ok(Some(..)) so that Ok(None)
falls through to the netlink path.1 parent 6924046 commit e0e2249
2 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| |||
0 commit comments