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 1704d72..3b9a246 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;
                }
        }