From e4071f9273c379d2a034b0e60676a3a9c6e58911 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Wed, 27 Jul 2011 07:28:13 +0000 Subject: [PATCH] debug vpn --- src/vpn/gnunet-daemon-vpn-helper.c | 19 +++++++++++++++++++ src/vpn/gnunet-daemon-vpn.c | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index 9dbd2ade7..75a6b2bad 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c @@ -364,6 +364,25 @@ message_token (void *cls __attribute__((unused)), } } } + else + { + GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Packet to %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x, which has no mapping\n", pkt6->ip6_hdr.dadr[0], + pkt6->ip6_hdr.dadr[1], + pkt6->ip6_hdr.dadr[2], + pkt6->ip6_hdr.dadr[3], + pkt6->ip6_hdr.dadr[4], + pkt6->ip6_hdr.dadr[5], + pkt6->ip6_hdr.dadr[6], + pkt6->ip6_hdr.dadr[7], + pkt6->ip6_hdr.dadr[8], + pkt6->ip6_hdr.dadr[9], + pkt6->ip6_hdr.dadr[10], + pkt6->ip6_hdr.dadr[11], + pkt6->ip6_hdr.dadr[12], + pkt6->ip6_hdr.dadr[13], + pkt6->ip6_hdr.dadr[14], + pkt6->ip6_hdr.dadr[15]); + } break; case 0x3a: /* ICMPv6 */ diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index cef876b52..9ff43cd7f 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -421,6 +421,23 @@ process_answer(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { unsigned char* c = ((unsigned char*)pkt)+ntohs(pkt->addroffset); new_ip6addr_remote(c, pkt->addr, pkt->addrsize); + GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "New mapping to %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n", + c[0], + c[1], + c[2], + c[3], + c[4], + c[5], + c[6], + c[7], + c[8], + c[9], + c[10], + c[11], + c[12], + c[13], + c[14], + c[15]); unsigned char* k = (unsigned char*)&key; /* * Copy the newly generated ip-address to the key backwards (as only the first part is used in the hash-table) -- 2.25.1