Skip to content

Commit

Permalink
Revert "egressgw: use proto kernel for fib routes and rules"
Browse files Browse the repository at this point in the history
This reverts commit dddfb36.

Signed-off-by: André Martins <andre@cilium.io>
  • Loading branch information
aanm committed Apr 1, 2023
1 parent afdc51f commit 3271cb2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/egressgateway/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func addEgressIpRule(endpointIP net.IP, dstCIDR *net.IPNet, egressIP net.IP, ifa
From: &net.IPNet{IP: endpointIP, Mask: net.CIDRMask(32, 32)},
To: dstCIDR,
Table: routingTableIdx,
Protocol: linux_defaults.RTProto,
}

return route.ReplaceRule(ipRule)
Expand Down Expand Up @@ -126,7 +125,6 @@ func addEgressIpRoutes(egressIP net.IPNet, ifaceIndex int) error {
Dst: &net.IPNet{IP: eniGatewayIP, Mask: net.CIDRMask(32, 32)},
Scope: netlink.SCOPE_LINK,
Table: routingTableIdx,
Protocol: linux_defaults.RTProto,
}); err != nil {
return fmt.Errorf("unable to add L2 nexthop route: %w", err)
}
Expand All @@ -137,7 +135,6 @@ func addEgressIpRoutes(egressIP net.IPNet, ifaceIndex int) error {
Dst: &net.IPNet{IP: net.IPv4zero, Mask: net.CIDRMask(0, 32)},
Table: routingTableIdx,
Gw: eniGatewayIP,
Protocol: linux_defaults.RTProto,
}); err != nil {
return fmt.Errorf("unable to add L2 nexthop route: %w", err)
}
Expand All @@ -154,7 +151,6 @@ func deleteIpRule(ipRule netlink.Rule) {
From: ipRule.Src,
To: ipRule.Dst,
Table: ipRule.Table,
Protocol: linux_defaults.RTProto,
})
}

Expand Down

0 comments on commit 3271cb2

Please sign in to comment.