Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1533 from amshinde/my-stable-1.5
Browse files Browse the repository at this point in the history
Stable 1.5 backport: netmon: Fix bug in how routes are converted
  • Loading branch information
jcvenegas authored Apr 15, 2019
2 parents 4599bdb + be664a4 commit dc5736e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netmon/netmon.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func convertRoutes(netRoutes []netlink.Route) []vcTypes.Route {
dst := ""
if netRoute.Dst != nil {
if netRoute.Dst.IP.To4() != nil {
dst = netRoute.Dst.IP.String()
dst = netRoute.Dst.String()
} else {
netmonLog.WithField("destination", netRoute.Dst.IP.String()).Warn("Not IPv4 format")
}
Expand Down
2 changes: 1 addition & 1 deletion netmon/netmon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func TestConvertRoutes(t *testing.T) {

expected := []vcTypes.Route{
{
Dest: testIPAddress,
Dest: testIPAddressWithMask,
Gateway: testIPAddress,
Source: testIPAddress,
Scope: uint32(testScope),
Expand Down

0 comments on commit dc5736e

Please sign in to comment.