]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: resolvers: mark servers with name-resolution as non purgeable
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 26 Aug 2021 13:35:59 +0000 (15:35 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 26 Aug 2021 13:53:17 +0000 (15:53 +0200)
When a server is configured with name-resolution, resolvers objects are
created with reference to this server. Thus the server is marked as non
purgeable to prevent its removal at runtime.

This does not need to be backport.

src/resolvers.c

index 1704d7227a00a2e9095784e332d1411e2b26067c..3b9a246e6d06ce3333ba0336542d3942f9e0d6be 100644 (file)
@@ -2470,6 +2470,8 @@ static int resolvers_finalize_config(void)
                                err_code |= (ERR_ALERT|ERR_ABORT);
                                continue;
                        }
+
+                       srv->flags |= SRV_F_NON_PURGEABLE;
                }
        }