MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / AllowPort

Method AllowPort

internal/firewalls/firewall_firewalld.go:85–92  ·  view source on GitHub ↗
(port int, protocol string)

Source from the content-addressed store, hash-verified

83}
84
85func (this *Firewalld) AllowPort(port int, protocol string) error {
86 if !this.isReady {
87 return nil
88 }
89 var cmd = executils.NewTimeoutCmd(10*time.Second, this.exe, "--add-port="+types.String(port)+"/"+protocol)
90 this.pushCmd(cmd, "")
91 return nil
92}
93
94func (this *Firewalld) AllowPortRangesPermanently(portRanges [][2]int, protocol string) error {
95 for _, portRange := range portRanges {

Callers

nothing calls this directly

Calls 2

pushCmdMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected