From b0dbda04c99321583e6f1d8e25704737361ef778 Mon Sep 17 00:00:00 2001 From: Mayuresh Gaitonde Date: Thu, 12 Sep 2019 14:44:21 -0700 Subject: [PATCH] Add a fix for gw ip --- controller/system.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/system.go b/controller/system.go index 471d8c0..b48677c 100644 --- a/controller/system.go +++ b/controller/system.go @@ -22,6 +22,10 @@ func via(dest net.IP) (net.IP, error) { if err != nil { return nil, fmt.Errorf("Failed to execute command: %s", cmd) } + if string(out) == "" { + // assume the provided dest is the next hop + return dest, nil + } return net.ParseIP(strings.TrimSpace(string(out))), nil }