summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-06-06 10:43:05 +1000
committerAndrew Tridgell <tridge@samba.org>2011-06-06 12:26:11 +1000
commit66aec3cf67595c7aec5d10775892dad2538caf65 (patch)
treee34f623a7bfb2ec7921731abe34da2304604886f /source4
parent25ac58dccef5d1da9946aeb191d6b6c4ee8782cf (diff)
downloadsamba-66aec3cf67595c7aec5d10775892dad2538caf65.tar.gz
samba-66aec3cf67595c7aec5d10775892dad2538caf65.tar.bz2
samba-66aec3cf67595c7aec5d10775892dad2538caf65.zip
s4-ipv6: removed the old unused ipv6 code in dcerpc_sock.c
the code is now generic to both V4 and V6
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c49
1 files changed, 6 insertions, 43 deletions
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index 1cd4d7121e..1dd993d94b 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -371,10 +371,7 @@ struct pipe_tcp_state {
};
-#if 0 /* disabled till we can resolve names to ipv6 addresses */
-static void continue_ipv6_open_socket(struct composite_context *ctx);
-#endif
-static void continue_ipv4_open_socket(struct composite_context *ctx);
+static void continue_ip_open_socket(struct composite_context *ctx);
static void continue_ip_resolve_name(struct composite_context *ctx);
static void continue_ip_resolve_name(struct composite_context *ctx)
@@ -383,7 +380,7 @@ static void continue_ip_resolve_name(struct composite_context *ctx)
struct composite_context);
struct pipe_tcp_state *s = talloc_get_type(c->private_data,
struct pipe_tcp_state);
- struct composite_context *sock_ipv4_req;
+ struct composite_context *sock_ip_req;
c->status = resolve_name_recv(ctx, s, &s->address);
if (!composite_is_ok(c)) return;
@@ -392,53 +389,19 @@ static void continue_ip_resolve_name(struct composite_context *ctx)
s->srvaddr = socket_address_from_strings(s->conn, "ip", s->address, s->port);
if (composite_nomem(s->srvaddr, c)) return;
- /* resolve_nbt_name gives only ipv4 ... - send socket open request */
- sock_ipv4_req = dcerpc_pipe_open_socket_send(c, s->conn, s->localaddr,
+ sock_ip_req = dcerpc_pipe_open_socket_send(c, s->conn, s->localaddr,
s->srvaddr, s->target_hostname,
NULL,
NCACN_IP_TCP);
- composite_continue(c, sock_ipv4_req, continue_ipv4_open_socket, c);
+ composite_continue(c, sock_ip_req, continue_ip_open_socket, c);
}
-/*
- Stage 2 of dcerpc_pipe_open_tcp_send: receive result of pipe open request
- on IPv6 and send the request on IPv4 unless IPv6 transport succeeded.
-*/
-#if 0 /* disabled till we can resolve names to ipv6 addresses */
-static void continue_ipv6_open_socket(struct composite_context *ctx)
-{
- struct composite_context *c = talloc_get_type(ctx->async.private_data,
- struct composite_context);
- struct pipe_tcp_state *s = talloc_get_type(c->private_data,
- struct pipe_tcp_state);
- struct composite_context *sock_ipv4_req;
-
- /* receive result of socket open request */
- c->status = dcerpc_pipe_open_socket_recv(ctx);
- if (NT_STATUS_IS_OK(c->status)) {
- composite_done(c);
- return;
- }
-
- talloc_free(s->srvaddr);
-
- /* prepare server address using host:ip and transport name */
- s->srvaddr = socket_address_from_strings(s->conn, "ip", s->address, s->port);
- if (composite_nomem(s->srvaddr, c)) return;
-
- /* try IPv4 if IPv6 fails */
- sock_ipv4_req = dcerpc_pipe_open_socket_send(c, s->conn, s->localaddr,
- s->srvaddr, s->target_hostname,
- NCACN_IP_TCP);
- composite_continue(c, sock_ipv4_req, continue_ipv4_open_socket, c);
-}
-#endif
/*
Stage 2 of dcerpc_pipe_open_tcp_send: receive result of pipe open request
- on IPv4 transport.
+ on IP transport.
*/
-static void continue_ipv4_open_socket(struct composite_context *ctx)
+static void continue_ip_open_socket(struct composite_context *ctx)
{
struct composite_context *c = talloc_get_type(ctx->async.private_data,
struct composite_context);