+ /* Will this nonsense work, even for UDP?
+ * The idea is that we need an address to send to for UDP, but we may not know
+ * this peer yet. So in that case, we need to create a new neighbor with the
+ * current address, but is this address going to be correct, or will it have a
+ * random high port or something? Another question is, why didn't we get a WELCOME
+ * from this peer with its advertised addresses already? We don't want to
+ * differentiate based on transport... */
+ n = find_neighbor(peer, NULL, 0);
+ if (n == NULL)
+ {
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Didn't find peer in list, adding...\n");
+#endif
+ setup_new_neighbor(peer, sender_address, sender_address_len);
+ n = find_neighbor(peer, sender_address, sender_address_len);
+ GNUNET_assert(n != NULL);
+ }
+ else if (n->addr == NULL)
+ {
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Found peer in list, but without address, adding!\n");
+#endif
+ n->addr = GNUNET_malloc(sender_address_len);
+ memcpy(n->addr, sender_address, sender_address_len);
+ n->addr_len = sender_address_len;
+ }
+
+ transmit_to_peer(NULL, TRANSPORT_DEFAULT_PRIORITY, &pong->header, GNUNET_NO, n);