Netlink Go library to interact with IP routes (#267)

This commit is contained in:
Quentin McGaw
2020-10-22 18:55:28 -04:00
committed by GitHub
parent a80cb8f9ba
commit ea3b3bc8a3
12 changed files with 118 additions and 840 deletions

View File

@@ -109,7 +109,7 @@ func (c *configurator) enable(ctx context.Context) (err error) {
}
// Re-ensure all routes exist
for _, subnet := range c.allowedSubnets {
if err := c.routing.AddRouteVia(ctx, subnet, c.defaultGateway, c.defaultInterface); err != nil {
if err := c.routing.AddRouteVia(subnet, c.defaultGateway, c.defaultInterface); err != nil {
return fmt.Errorf("cannot enable firewall: %w", err)
}
}