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

fix netstat -f error on linux distros #3592

Merged
merged 3 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/minikube/tunnel/route_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (router *osRouter) EnsureRouteIsAdded(route *Route) error {
}

func (router *osRouter) Inspect(route *Route) (exists bool, conflict string, overlaps []string, err error) {
cmd := exec.Command("netstat", "-nr", "-f", "inet")
cmd := exec.Command("route", "-n")
tstromberg marked this conversation as resolved.
Show resolved Hide resolved
cmd.Env = append(cmd.Env, "LC_ALL=C")
stdInAndOut, err := cmd.CombinedOutput()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/tunnel/route_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func TestLinuxRouteCleanupIdempontentIntegrationTest(t *testing.T) {
func TestParseTable(t *testing.T) {

const table = `Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.31.126.254 0.0.0.0 UG 0 0 0 eno1
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.31.126.254 0.0.0.0 UG 100 0 0 eno1
10.96.0.0 127.0.0.1 255.240.0.0 UG 0 0 0 eno1
172.31.126.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
`
Expand Down