commit | 73bed9ff135472c0e02b5aba08845b8a359eb268 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Fri Dec 04 14:43:36 2020 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Fri Dec 04 15:08:00 2020 +0100 |
tree | f24cb63db67105c8ff17dfd3dd130bcf81c8e13d | |
parent | c31bc724d4e6793c8a543d03e3b4f968d6fcba29 [diff] |
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.