From d74889b409a52636cc831e283be7fdc1eda8dff4 Mon Sep 17 00:00:00 2001
From: Vadim Penzin <vadimp@users.sf.net>
Date: Tue, 28 Oct 2014 23:07:49 -0400
Subject: [PATCH 06/28] Fixed failure to recognise connections from localhost
 over IPv6

Misplaced closing curly bracket makes check for ::1 a dead code.
The attached patch fixes this issue.

From https://sourceforge.net/p/trousers/trousers/ci/96a3a67e5ac023aaf8932ec8ac769a04523bd984/
---
 src/tcs/rpc/tcstp/rpc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tcs/rpc/tcstp/rpc.c b/src/tcs/rpc/tcstp/rpc.c
index 08deb84..cc8a085 100644
--- a/src/tcs/rpc/tcstp/rpc.c
+++ b/src/tcs/rpc/tcstp/rpc.c
@@ -540,6 +540,7 @@ access_control(struct tcsd_thread_data *thread_data)
 		if (memcmp(&sa_in->sin_addr.s_addr, &nloopaddr,
 					sizeof(in_addr_t)) == 0)
 			is_localhost = 1;
+        }
 	else if (sa->sa_family == AF_INET6) {
 		struct sockaddr_in6 *sa_in6 = (struct sockaddr_in6 *)sa;
 		if (memcmp(&sa_in6->sin6_addr.s6_addr, &in6addr_loopback,
@@ -551,7 +552,7 @@ access_control(struct tcsd_thread_data *thread_data)
 	 * approve it */
 	if (is_localhost)
 		return 0;
-	} else {
+	else {
 		while (tcsd_options.remote_ops[i]) {
 			if ((UINT32)tcsd_options.remote_ops[i] == thread_data->comm.hdr.u.ordinal) {
 				LogInfo("Accepted %s operation from %s",
-- 
1.8.3.1

