- EVP_DecryptInit(cl->cipher_inctx, EVP_bf_cfb(), cl->cipher_inkey, cl->cipher_inkey + EVP_bf_cfb()->key_len);
-
-cp
- if(cl->status.outgoing)
- return send_ack(cl);
- else
- return send_metakey(cl);
-}
-
-int send_ack(connection_t *cl)
-{
- int x;
-cp
- if(cl->status.outgoing)
- cl->allow_request = ACK;
-
- x = send_request(cl, "%d", ACK);
- cl->status.encryptout = 1;
-cp
- return x;
-}
-
-int ack_h(connection_t *cl)
-{
- connection_t *old, *p;
- subnet_t *subnet;
- rbl_t *rbl, *rbl2;
-cp
- /* Okay, before we active the connection, we check if there is another entry
- in the connection list with the same name. If so, it presumably is an
- old connection that has timed out but we don't know it yet.
- */
-
- while((old = lookup_id(cl->name)))
- {
- if(debug_lvl >= DEBUG_CONNECTIONS)
- syslog(LOG_NOTICE, _("Removing old entry for %s at %s in favour of new connection from %s"),
- cl->name, old->hostname, cl->hostname);
-
- terminate_connection(old);
- }
-
- /* Activate this connection */
-
- cl->allow_request = ALL;
- cl->status.active = 1;
- cl->status.decryptin = 1;
- cl->nexthop = cl;
- cl->cipher_pkttype = EVP_bf_cfb();
- cl->cipher_pktkeylength = cl->cipher_pkttype->key_len + cl->cipher_pkttype->iv_len;
-
- if(debug_lvl >= DEBUG_CONNECTIONS)
- syslog(LOG_NOTICE, _("Connection with %s (%s) activated"), cl->name, cl->hostname);
-
-cp
- if(!cl->status.outgoing)
- send_ack(cl);