-
Bug
-
Resolution: Done
-
Major
-
3.0.0.Alpha12
-
None
There is a discrepancy between how 0 is handled.
XSD
<xs:attribute name="source-port" type="xs:positiveInteger" use="optional">
doesn't allow 0.
MODEL
.setAllowExpression(true).setValidator(new IntRangeValidator(0, 65535, true, true))
allows 0.
IMPLEMENTATION
public Integer getAbsoluteSourcePort() {
if (this.sourcePort == null) {
return null;
}
if (this.fixedSourcePort) {
return this.sourcePort;
}
final int portOffset = this.socketBindingManager.getPortOffset();
return this.sourcePort + portOffset;
}
doesn't treat 0 at all, tests for null value only.
Example to reproduce e.g. with modcluster integration in core:
[standalone@localhost:9990 /] /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy1:add(port=9090,host=127.0.0.1,source-port=0
{
"outcome" => "success",
"response-headers" => {"process-state" => "reload-required"}
}
[standalone@localhost:9990 /] /subsystem=modcluster/mod-cluster-config=configuration:write-attribute(name=proxies,value=[proxy1])
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
[standalone@localhost:9990 /] :reload
{
"outcome" => "success",
"result" => undefined
}
Starting server with
-Djboss.socket.binding.port-offset=100
yields
20:15:40,471 ERROR [org.jboss.modcluster] (UndertowEventHandlerAdapter - 1) MODCLUSTER000043: Failed to send INFO command to localhost/127.0.0.1:9090: Permission denied (Bind failed)
- blocks
-
JBEAP-7433 Mod cluster not working with non-root user
-
- Closed
-
-
WFLY-6915 Mod cluster not working with non-root user
-
- Closed
-