+ if(old = lookup_conn(vpn_ip))
+ {
+ if((real_ip==old->real_ip) && (vpn_mask==old->vpn_mask) && (port==old->port))
+ {
+ if(debug_lvl>1)
+ syslog(LOG_NOTICE, _("Got duplicate ADD_HOST for %s (%s) from %s (%s)"),
+ old->vpn_hostname, old->real_hostname, cl->vpn_hostname, cl->real_hostname);
+ goto skip_add_host; /* One goto a day keeps the deeply nested if constructions away. */
+ }
+ else
+ {
+ if(debug_lvl>1)
+ syslog(LOG_NOTICE, _("Removing old entry for %s (%s)"),
+ old->vpn_hostname, old->real_hostname);
+ old->status.active = 0;
+ terminate_connection(old);
+ }
+ }