diff options
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_tcp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_tcp.c b/source4/librpc/rpc/dcerpc_tcp.c index 785ef46423..ec94baf583 100644 --- a/source4/librpc/rpc/dcerpc_tcp.c +++ b/source4/librpc/rpc/dcerpc_tcp.c @@ -155,6 +155,10 @@ NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p, int fd; struct in_addr addr; + if (port == 0) { + port = 135; + } + addr.s_addr = interpret_addr(server); if (addr.s_addr == 0) { return NT_STATUS_BAD_NETWORK_NAME; @@ -195,6 +199,7 @@ NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p, if (!NT_STATUS_IS_OK(status)) { dcerpc_pipe_close(*p); + return status; } return NT_STATUS_OK; |