From: Frédéric Lécaille Date: Thu, 15 Jun 2017 12:09:10 +0000 (+0200) Subject: BUG/MAJOR: server: Segfault after parsing server state file. X-Git-Tag: v1.8-dev3~288 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0bedb8ac90ffdf1498a999c44d1c91556fb726ee;p=thirdparty%2Fhaproxy.git BUG/MAJOR: server: Segfault after parsing server state file. This patch makes the server state file parser ignore servers wich are not present in the configuration file. --- diff --git a/src/server.c b/src/server.c index 74450a165d..008bafa536 100644 --- a/src/server.c +++ b/src/server.c @@ -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 */