]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: server: Segfault after parsing server state file.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 15 Jun 2017 12:09:10 +0000 (14:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Jun 2017 13:30:30 +0000 (15:30 +0200)
This patch makes the server state file parser ignore servers wich are
not present in the configuration file.

src/server.c

index 74450a165dfed512fd11bacceb85b8f102929498..008bafa536d3dca2901bc5e89e2cb4600b4529cb 100644 (file)
@@ -3479,10 +3479,12 @@ void apply_server_state(void)
                        else if (diff & PR_FBM_MISMATCH_ID) {
                                Warning("In backend '%s' (id: '%d'): server ID mismatch: from server state file: '%s', from running config %d\n", bk->id, bk->uuid, params[2], srv->puid);
                                send_log(bk, LOG_NOTICE, "In backend '%s' (id: %d): server ID mismatch: from server state file: '%s', from running config %d\n", bk->id, bk->uuid, params[2], srv->puid);
+                               continue;
                        }
                        else if (diff & PR_FBM_MISMATCH_NAME) {
                                Warning("In backend '%s' (id: %d): server name mismatch: from server state file: '%s', from running config '%s'\n", bk->id, bk->uuid, params[3], srv->id);
                                send_log(bk, LOG_NOTICE, "In backend '%s' (id: %d): server name mismatch: from server state file: '%s', from running config '%s'\n", bk->id, bk->uuid, params[3], srv->id);
+                               continue;
                        }
 
                        /* now we can proceed with server's state update */