X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=c16a261b4da01fba0cb5c11443dcde22e2126da3;hp=86223b94b6d43f4fa88813a4f3dd368faf6bbe03;hb=da9a1e8084a9b73306bdbc541ee8af938c3e7754;hpb=1857b3c97c261dda9978a67d07b315bb3ca68841 diff --git a/src/net.c b/src/net.c index 86223b94..c16a261b 100644 --- a/src/net.c +++ b/src/net.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c,v 1.35.4.78 2000/11/20 19:41:10 guus Exp $ + $Id: net.c,v 1.35.4.80 2000/11/20 23:29:46 guus Exp $ */ #include "config.h" @@ -1113,9 +1113,8 @@ cp void terminate_connection(connection_t *cl) { connection_t *p; - subnet_t *s; + subnet_t *subnet; rbl_t *rbl; - cp if(cl->status.remove) return; @@ -1131,7 +1130,6 @@ cp if(cl->status.meta) close(cl->meta_socket); -cp /* Find all connections that were lost because they were behind cl (the connection that was dropped). */ @@ -1155,7 +1153,11 @@ cp /* Remove the associated subnets */ - rbl_delete_rbltree(cl->subnet_tree); + RBL_FOREACH(cl->subnet_tree, rbl) + { + subnet = (subnet_t *)rbl->data; + subnet_del(subnet); + } /* Check if this was our outgoing connection */