From e5e5a1110fb4092a1221512627b1f9d03ec8839c Mon Sep 17 00:00:00 2001 From: Julien Kerihuel Date: Fri, 27 Aug 2010 14:04:07 +0200 Subject: Add unique IP address binding for client connections (EPM and ncacn_ip_tcp levels) This allows for binding strings like this: ncacn_ip_tcp:host[localaddress=192.168.2.1,seal] which will force the connection to be locally bound to the specified IP address Signed-off-by: Andrew Tridgell --- source4/librpc/tests/binding_string.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/librpc/tests/binding_string.c') diff --git a/source4/librpc/tests/binding_string.c b/source4/librpc/tests/binding_string.c index 6de94eb58b..dfb6d2967a 100644 --- a/source4/librpc/tests/binding_string.c +++ b/source4/librpc/tests/binding_string.c @@ -128,6 +128,12 @@ static bool test_parse_check_results(struct torture_context *tctx) torture_assert_int_equal(tctx, b->object.if_version, 0, "object version"); torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(tctx, "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:$SERVER", &b), "parse"); + torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(tctx, "ncacn_ip_tcp:$SERVER[,sign,localaddress=192.168.1.1]", &b), "parse"); + torture_assert(tctx, b->transport == NCACN_IP_TCP, "ncacn_ip_tcp expected"); + torture_assert(tctx, b->flags == (DCERPC_SIGN | DCERPC_LOCALADDRESS), "sign flag"); + torture_assert_str_equal(tctx, b->localaddress, "192.168.1.1", "localaddress"); + torture_assert_str_equal(tctx, "ncacn_ip_tcp:$SERVER[,sign,localaddress=192.168.1.1]", + dcerpc_binding_string(tctx, b), "back to string"); return true; } -- cgit