Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support "ip route get" as fallback on linux systems #17

Merged
merged 1 commit into from Apr 7, 2018

Conversation

tmm1
Copy link
Contributor

@tmm1 tmm1 commented Apr 7, 2018

this fixes gateway lookups on android, where neither netstat -rn
nor ip route show display the gateway.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0

$ ip route show
10.0.1.0/24 dev eth0  proto kernel  scope link  src 10.0.1.36

$ ip route get 8.8.8.8
8.8.8.8 via 10.0.1.1 dev eth0  src 10.0.1.36  uid 2000
    cache

this fixes gateway lookups on android, where neither `netstat -rn`
nor `ip route show` display the gateway.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0

$ ip route show
10.0.1.0/24 dev eth0  proto kernel  scope link  src 10.0.1.36

$ ip route get 8.8.8.8
8.8.8.8 via 10.0.1.1 dev eth0  src 10.0.1.36  uid 2000
    cache
@jackpal jackpal merged commit cbcf4e3 into jackpal:master Apr 7, 2018
@jackpal
Copy link
Owner

jackpal commented Apr 7, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants