Hi guys, On Tue, Dec 29, 2020 at 10:45:17AM +0100, Frederic Lecaille wrote: > You work sounds perfect to me.
FWIW I agree that th patch looks particularly clean. I've not studied it though, I trust you :-) > I am not sure we will import the second patch for the reg test: it makes > usage of curl. We try to not use external programs for reg tests except if > there is no choice. This is not the case here. > > Willy, could you have a look at the first patch, especially sa2str() > implementation. I have doubt about its portability: > > const int max_length = sizeof(struct sockaddr_un) - offsetof(struct > sockaddr_un, sun_path) - 1; > return memprintf(&out, "abns@%.*s", max_length, path+1); > > > As far as I see, everywhere that unix socket are used in haproxy code, we > consider ->sun_path as NULL terminated. I think it's OK since "%.*" fixes the maximum length anyway so it will always work. But you're right, we normally enforce the trailing zero, so I guess that "abns@%s" would equally work. But there's nothing wrong here anyway, and we don't have an portability issues since abns only exists on linux, which limits the scope. I'm merging the patch then. Thayne, I'll extend a little bit your commit message to mention that the peers support was also implemented (the text only mentions stick-tables). Thanks to you both! Willy

