[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4038 - GNUnet/src/transports
From: |
grothoff |
Subject: |
[GNUnet-SVN] r4038 - GNUnet/src/transports |
Date: |
Sat, 23 Dec 2006 20:28:38 -0800 (PST) |
Author: grothoff
Date: 2006-12-23 20:28:37 -0800 (Sat, 23 Dec 2006)
New Revision: 4038
Modified:
GNUnet/src/transports/tcp.c
Log:
better messages
Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2006-12-24 04:23:38 UTC (rev 4037)
+++ GNUnet/src/transports/tcp.c 2006-12-24 04:28:37 UTC (rev 4038)
@@ -93,12 +93,32 @@
addr,
addr_len);
} else {
+#if DEBUG_TCP
+ GE_LOG(ectx,
+ GE_DEBUG | GE_ADMIN | GE_BULK,
+ "Rejecting connection (invalid address length %u)\n",
+ addr_len);
+#endif
return SYSERR;
}
MUTEX_LOCK(tcpblacklistlock);
ret = check_ipv4_listed(filteredNetworks_,
ip);
MUTEX_UNLOCK(tcpblacklistlock);
+#if DEBUG_TCP
+ if (ret != OK) {
+ EncName enc;
+
+ hash2enc(&helo->senderIdentity.hashPubKey,
+ &enc);
+ GE_LOG(ectx,
+ GE_DEBUG | GE_ADMIN | GE_BULK,
+ "Rejecting connection from address %u.%u.%u.%u:%u (blacklisted)\n",
+ PRIP(ntohl(*(int*)&haddr->ip)),
+ ntohs(haddr->port));
+ }
+#endif
+
return ret;
}
@@ -119,6 +139,12 @@
addr,
addr_len);
} else {
+#if DEBUG_TCP
+ GE_LOG(ectx,
+ GE_DEBUG | GE_ADMIN | GE_BULK,
+ "Rejecting connection (invalid address length %u)\n",
+ addr_len);
+#endif
return SYSERR;
}
ret = OK;
@@ -127,6 +153,15 @@
ret = check_ipv4_listed(allowedNetworks_,
ip);
MUTEX_UNLOCK(tcpblacklistlock);
+ if (ret != OK) {
+#if DEBUG_TCP
+ GE_LOG(ectx,
+ GE_DEBUG | GE_ADMIN | GE_BULK,
+ "Rejecting HELLO from address %u.%u.%u.%u:%u (not whitelisted)\n",
+ PRIP(ntohl(*(int*)&haddr->ip)),
+ ntohs(haddr->port));
+#endif
+ }
return ret;
}
@@ -191,11 +226,9 @@
hash2enc(&helo->senderIdentity.hashPubKey,
&enc);
GE_LOG(ectx,
- GE_DEBUG | GE_DEVELOPER | GE_BULK,
- "Rejecting HELLO from `%s' at address %u.%u.%u.%u:%u\n",
- &enc,
- PRIP(ntohl(*(int*)&haddr->ip)),
- ntohs(haddr->port));
+ GE_DEBUG | GE_ADMIN | GE_BULK,
+ "Rejecting HELLO from `%s'\n",
+ &enc);
#endif
return SYSERR; /* obviously invalid */
}
@@ -318,7 +351,7 @@
}
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_DEVELOPER | GE_BULK,
+ GE_DEBUG | GE_DEVELOPER | GE_USER | GE_BULK,
"Establishing connection to %u.%u.%u.%u:%u\n",
PRIP(ntohl(*(int*)&haddr->ip)),
ntohs(haddr->port));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4038 - GNUnet/src/transports,
grothoff <=