INNER CODE UNIT · Go

func

uswitch/kiam · cmd/kiam/agent.go:59

func (opts *agentCommand) run() error {
	opts.configureLogger()

	if opts.iptables {
		log.Infof("configuring iptables")
		rules := newIPTablesRules(opts.hostIP, opts.ListenPort, opts.hostInterface)
		err := rules.Add()
		if err != nil {
			log.Errorf("error configuring iptables: %s", err.Error())
			return err
		}
		if opts.iptablesRemove {
			defer func() {
				log.Infof("undoing iptables changes")
				rules.Remove()
			}()
		}
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…