mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-19 02:29:31 -05:00
When we want to avoid keeping pointers on a nameserver struct, it's not always convenient to refer as a nameserver using it's text-based unique identifier since it's not limited in length thus it cannot be serialized and deserialized safely. To address this limitation, we add a new ->puid member in dns_nameserver struct which is a parent-unique numeric value that can be used to refer to the dns nameserver within its parent resolver context. To achieve this, we reused the resolver->nb_nameserver member that wasn't used. Each time we add a new nameserver to a resolver: we set ns->puid to the current number of nameservers within the resolver and we increment this number right away. Public helper function find_nameserver_by_resolvers_and_id() was added to help retrieve nameserver pointer from (resolver X nameserver puid) combination. |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||