]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: peers: prevent unitialized multiple listeners on peers section
authorEmeric Brun <ebrun@haproxy.com>
Wed, 25 May 2022 08:25:45 +0000 (10:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 25 May 2022 13:10:08 +0000 (15:10 +0200)
commitca82578fe82bc8fadec675efc60b56e2cea4feaf
tree0927e5d2a28b487b51005f34bd9df70a8febd0a1
parent49f6f4b1a7895b8906c2ee5a183f013db00fcaf0
BUG/MEDIUM: peers: prevent unitialized multiple listeners on peers section

The previous fix:
BUG/MEDIUM: peers: fix segfault using multiple bind on peers

Prevents to declare multiple listeners on a peers sections but if
peers protocol is extended to support this we could raise the bug
again.

Indeed, after allocating a new listener and adding it to a list the
code mistakenly re-configure the first element of the list instead
of the new added one, and the last one remains finally uninitialized.
The previous fix assure there is no more than one listener in this
list but this could be changed in futur.

This patch patch assures we configure and initialize the newly added
listener instead of the first one in the list.

This patch could be backported until version 2.0 to complete
BUG/MEDIUM: peers: fix segfault using multiple bind on peers
src/cfgparse.c