Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Commit

Permalink
ipv6: Ignore routes that have ipv6 gateway
Browse files Browse the repository at this point in the history
We ignore routes that have an ipv6 destination, since kata agent
does not have support for ipv6 currently. We should do the same
for default route that has an ipv6 gateway address.

Fixes #672

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
  • Loading branch information
amshinde committed Mar 12, 2018
1 parent d10b7c1 commit 66d2b8e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,17 @@ func (k *kataAgent) generateInterfacesAndRoutes(networkNS NetworkNamespace) ([]*
}

if route.Gw != nil {
r.Gateway = route.Gw.String()
gateway := route.Gw.String()

if route.Gw.To4() == nil {
// Skip IPv6 because is is not supported
k.Logger().WithFields(logrus.Fields{
"unsupported-route-type": "ipv6",
"gateway": gateway,
}).Warn("unsupported route")
continue
}
r.Gateway = gateway
}

if route.Src != nil {
Expand Down

0 comments on commit 66d2b8e

Please sign in to comment.