Fix infinity loop when network address and
[tinc] / src / net.c
index e9aed34..22c9d37 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -95,7 +95,7 @@ void purge(void) {
 /* Put a misbehaving connection in the tarpit */
 void tarpit(int fd) {
        static int pits[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-       static int next_pit = 0;
+       static unsigned int next_pit = 0;
 
        if(pits[next_pit] != -1) {
                closesocket(pits[next_pit]);
@@ -405,6 +405,7 @@ int reload_configuration(void) {
                        subnet_t *subnet, *s2;
 
                        if(!get_config_subnet(cfg, &subnet)) {
+                               cfg = lookup_config_next(config_tree, cfg);
                                continue;
                        }