Hi Anthony,

On Mon, Mar 11, 2024 at 08:58:17PM -0400, Anthony Deschamps wrote:
> > I'm not sure the scripts will help me (at least :-)). I was thinking that
> > a test could just be "set server XXX addr YYY" on the CLI to change the
> > server's address and verify that the hashing follows the address not the
> > server number.
> 
> Oh, good point -- I wasn't testing what happens when changing the address
> via the CLI. It turns out I wasn't handling that case. I added a call in
> _srv_set_inetaddr_port() to update the hashes, and tested that it works.
> 
> I also moved the docs and added an entry to the table.
> 
> Here's the updated patch.

Thanks!

However there's still a problem with your mailer mangling the patch
see below:

> + /* If hash-key is addr or addr-port then we need the address, but if we
> + * can't determine the address then we fall back on hashing the puid.
> + */
> + switch (s->hash_key) {
> + case SRV_HASH_KEY_ADDR:
> + case SRV_HASH_KEY_ADDR_PORT:
> + server_get_inetaddr(s, &srv_addr);
> + if (srv_addr.family != AF_INET && srv_addr.family != AF_INET6) {
> +  hash_key = SRV_HASH_KEY_ID;
> + }
> + break;
(...)

Can you please resend it as an attachment instead ?

Thanks!
Willy

Reply via email to