Maint: remove routing from firewall configurator
This commit is contained in:
@@ -248,7 +248,7 @@ func _main(ctx context.Context, buildInfo models.BuildInformation,
|
|||||||
Prefix: "firewall: ",
|
Prefix: "firewall: ",
|
||||||
Level: firewallLogLevel,
|
Level: firewallLogLevel,
|
||||||
})
|
})
|
||||||
firewallConf := firewall.NewConfig(firewallLogger, cmder, routingConf,
|
firewallConf := firewall.NewConfig(firewallLogger, cmder,
|
||||||
defaultInterface, defaultGateway, localNetworks, defaultIP)
|
defaultInterface, defaultGateway, localNetworks, defaultIP)
|
||||||
|
|
||||||
if err := routingConf.Setup(); err != nil {
|
if err := routingConf.Setup(); err != nil {
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ type Configurator interface {
|
|||||||
type Config struct { //nolint:maligned
|
type Config struct { //nolint:maligned
|
||||||
runner command.Runner
|
runner command.Runner
|
||||||
logger logging.Logger
|
logger logging.Logger
|
||||||
routing routing.Routing
|
|
||||||
iptablesMutex sync.Mutex
|
iptablesMutex sync.Mutex
|
||||||
ip6tablesMutex sync.Mutex
|
ip6tablesMutex sync.Mutex
|
||||||
defaultInterface string
|
defaultInterface string
|
||||||
@@ -48,12 +47,11 @@ type Config struct { //nolint:maligned
|
|||||||
|
|
||||||
// NewConfig creates a new Config instance.
|
// NewConfig creates a new Config instance.
|
||||||
func NewConfig(logger logging.Logger, runner command.Runner,
|
func NewConfig(logger logging.Logger, runner command.Runner,
|
||||||
routing routing.Routing, defaultInterface string, defaultGateway net.IP,
|
defaultInterface string, defaultGateway net.IP,
|
||||||
localNetworks []routing.LocalNetwork, localIP net.IP) *Config {
|
localNetworks []routing.LocalNetwork, localIP net.IP) *Config {
|
||||||
return &Config{
|
return &Config{
|
||||||
runner: runner,
|
runner: runner,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
routing: routing,
|
|
||||||
allowedInputPorts: make(map[uint16]string),
|
allowedInputPorts: make(map[uint16]string),
|
||||||
ip6Tables: ip6tablesSupported(context.Background(), runner),
|
ip6Tables: ip6tablesSupported(context.Background(), runner),
|
||||||
customRulesPath: "/iptables/post-rules.txt",
|
customRulesPath: "/iptables/post-rules.txt",
|
||||||
|
|||||||
Reference in New Issue
Block a user