]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: listener: automatically set the port when creating listeners
authorWilly Tarreau <w@1wt.eu>
Fri, 4 Dec 2020 13:49:11 +0000 (14:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 4 Dec 2020 14:08:00 +0000 (15:08 +0100)
commit07400c56bb0ab81cfd2e295c790b699839fea0a3
tree5725987a5b0de70b95aab93422306c0592a39c53
parent73bed9ff135472c0e02b5aba08845b8a359eb268
MINOR: listener: automatically set the port when creating listeners

In create_listeners() we iterate over a port range and call the
protocol's ->add() function to add a new listener on the specified
port. Only tcp4/tcp6/udp4/udp6 support a port, the other ones ignore
it. Now that we can rely on the address family to properly set the
port, better do it this way directly from create_listeners() and
remove the family-specific case from the protocol layer.
src/listener.c
src/proto_tcp.c
src/proto_udp.c