]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: introduce new option PA_O_DEFAULT_DGRAM on str2sa_range.
authorEmeric Brun <ebrun@haproxy.com>
Mon, 22 Mar 2021 16:17:34 +0000 (17:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 23 Mar 2021 14:32:22 +0000 (15:32 +0100)
commit69ba35146fcbd029f6f74866c1cbe160d81d3a63
treec2dc52ad9aa683f7cc05a9ab9e848e1ea3cef523
parent8cc586c73fefd96f4be1f7820e38a1263f6252ca
MINOR: tools: introduce new option PA_O_DEFAULT_DGRAM on str2sa_range.

str2sa_range function options PA_O_DGRAM and PA_O_STREAM are used to
define the supported address types but also to set the default type
if it is not explicit. If the used address support both STREAM and DGRAM,
the default was always set to STREAM.

This patch introduce a new option PA_O_DEFAULT_DGRAM to force the
default to DGRAM type if it is not explicit in the address field
and both STREAM and DGRAM are supported. If only DGRAM or only STREAM
is supported, it continues to be considered as the default.
include/haproxy/tools-t.h
src/tools.c