Add and fix port range rules and update documentation for it
This commit is contained in:
@@ -154,6 +154,9 @@ func (ep *EndpointBase) parsePPP(typedEp Endpoint, fields []string) (Endpoint, e
|
||||
return nil, invalidDefinitionError(fields, "port number parsing error")
|
||||
}
|
||||
}
|
||||
if n16 == 0 {
|
||||
return nil, invalidDefinitionError(fields, "port number cannot be 0")
|
||||
}
|
||||
ep.StartPort = n16
|
||||
// parse end port
|
||||
if len(portSplitted) > 1 {
|
||||
@@ -167,6 +170,9 @@ func (ep *EndpointBase) parsePPP(typedEp Endpoint, fields []string) (Endpoint, e
|
||||
}
|
||||
}
|
||||
}
|
||||
if n16 == 0 {
|
||||
return nil, invalidDefinitionError(fields, "port number cannot be 0")
|
||||
}
|
||||
ep.EndPort = n16
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func (r *reason) String() string {
|
||||
prefix = "allowed by rule: "
|
||||
}
|
||||
|
||||
return prefix + r.description + " " + r.Value
|
||||
return prefix + r.description + " " + r.Filter[2:]
|
||||
}
|
||||
|
||||
func (r *reason) Context() interface{} {
|
||||
|
||||
Reference in New Issue
Block a user