mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-01 07:47:15 +00:00
Merge pull request #1936 from amshinde/ignore-routes-with-kernel-proto
network: Ignore routes with proto as "kernel"
This commit is contained in:
commit
cfedb06a19
@ -307,6 +307,11 @@ func convertRoutes(netRoutes []netlink.Route) []vcTypes.Route {
|
||||
// by Kata yet.
|
||||
for _, netRoute := range netRoutes {
|
||||
dst := ""
|
||||
|
||||
if netRoute.Protocol == unix.RTPROT_KERNEL {
|
||||
continue
|
||||
}
|
||||
|
||||
if netRoute.Dst != nil {
|
||||
if netRoute.Dst.IP.To4() != nil {
|
||||
dst = netRoute.Dst.String()
|
||||
|
@ -1170,6 +1170,10 @@ func generateInterfacesAndRoutes(networkNS NetworkNamespace) ([]*vcTypes.Interfa
|
||||
for _, route := range endpoint.Properties().Routes {
|
||||
var r vcTypes.Route
|
||||
|
||||
if route.Protocol == unix.RTPROT_KERNEL {
|
||||
continue
|
||||
}
|
||||
|
||||
if route.Dst != nil {
|
||||
r.Dest = route.Dst.String()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user