Update firewall_windows.go

This commit is contained in:
456vv 2020-03-17 22:06:10 +08:00 committed by GitHub
commit bcab45be63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ func (f *WindowsFirewall) AllowPort(port int, address string, proto string, allo
}
func (f *WindowsFirewall) EnableRedirection(r *Redirection, enabled bool) error {
if err := f.AllowPort(r.SrcPort, r.DstAddress, r.Protocol, enabled); err != nil {
if err := f.AllowPort(r.SrcPort, r.SrcAddress, r.Protocol, enabled); err != nil {
return err
} else if err := f.AllowPort(r.DstPort, r.DstAddress, r.Protocol, enabled); err != nil {
return err