+ else
+
+ /* If indirectdata flag is set for the destination we just looked up,
+ * then real_ip is actually the vpn_ip of the gateway tincd
+ * it is behind.
+ */
+
+ if(cl->flags & INDIRECTDATA)
+ {
+ if(debug_lvl > 3)
+ syslog(LOG_NOTICE, _("Indirect packet to %s via %s"),
+ cl->name, cl->hostname);
+ if((cl = lookup_conn(cl->real_ip)) == NULL)
+ {
+ if(debug_lvl > 3)
+ syslog(LOG_NOTICE, _("Indirect look up %d.%d.%d.%d in connection list failed!"), IP_ADDR_V(to));
+
+ /* Gateway tincd dead? Should we kill it? (GS) */
+
+ return -1;
+ }
+ if(cl->flags & INDIRECTDATA) /* This should not happen */
+ {
+ if(debug_lvl > 3)
+ syslog(LOG_NOTICE, _("Double indirection for %d.%d.%d.%d"), IP_ADDR_V(to));
+ return -1;
+ }
+ }