Skip to content

Commit 7b23c90

Browse files
committed
BUG/MINOR: cfgparse-quic: fix bbr initialization
To support pacing with cubic, a recent change was introduced to render quic_cc_algo on bind line dynamically allocated, instead of pointing to a globally defined variable. This allows customization of the algorithm callbacks per bind line. This was not correctly used for BBR as it was set to point to the global quic_cc_algo_bbr. This causes a segfault on haproxy process closing. Fix this by properly initializing BBR as other algorithms. This should fix coverity report from github issue #2786.
1 parent e58a30d commit 7b23c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cfgparse-quic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
151151

152152
/* bbr */
153153
algo = QUIC_CC_BBR_STR;
154-
cc_algo = &quic_cc_algo_bbr;
154+
*cc_algo = quic_cc_algo_bbr;
155155
arg += strlen(QUIC_CC_BBR_STR);
156156
}
157157
else if (strncmp(arg, QUIC_CC_NO_CC_STR, strlen(QUIC_CC_NO_CC_STR)) == 0) {

0 commit comments

Comments
 (0)