fix(routing): add policy rules for each destination local networks (#1493)

This commit is contained in:
Kyle Manna
2023-04-11 11:03:07 -05:00
committed by GitHub
parent 16ecf48b89
commit fc8a2abb8f
2 changed files with 23 additions and 0 deletions

View File

@@ -325,6 +325,11 @@ func _main(ctx context.Context, buildInfo models.BuildInformation,
return err
}
err = routingConf.AddLocalRules(localNetworks)
if err != nil {
return fmt.Errorf("adding local rules: %w", err)
}
const tunDevice = "/dev/net/tun"
if err := tun.Check(tunDevice); err != nil {
logger.Info(err.Error() + "; creating it...")