MINOR: protocol: add a ->set_port() helper to address families
At various places we need to set a port on an IPv4 or IPv6 address, and
it requires casts that are easy to get wrong. Let's add a new set_port()
helper to the address family to assist in this. It will be directly
accessible from the protocol and will make the operation seamless.
Right now this is only implemented for sock_inet as other families do
not need a port.
(cherry picked from commit 73bed9ff135472c0e02b5aba08845b8a359eb268)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
3 files changed