Method
AllowPort
(port int, protocol string)
Source from the content-addressed store, hash-verified
| 83 | } |
| 84 | |
| 85 | func (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 | |
| 94 | func (this *Firewalld) AllowPortRangesPermanently(portRanges [][2]int, protocol string) error { |
| 95 | for _, portRange := range portRanges { |
Callers
nothing calls this directly
Tested by
no test coverage detected