mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MAJOR: resolvers: segfault using server template without SRV RECORDs
This patch fix the issue adding a test in srvrq before registering
the server on it during server template init.
This was a regression due to commit :
3406766d57
This should be backported with this previous commit (until 2.0)
This commit is contained in:
parent
b89c0e4635
commit
caef19e0c7
@ -2306,6 +2306,7 @@ static int _srv_parse_tmpl_init(struct server *srv, struct proxy *px)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* append to list of servers available to receive an hostname */
|
/* append to list of servers available to receive an hostname */
|
||||||
|
if (newsrv->srvrq)
|
||||||
LIST_APPEND(&newsrv->srvrq->attached_servers, &newsrv->srv_rec_item);
|
LIST_APPEND(&newsrv->srvrq->attached_servers, &newsrv->srv_rec_item);
|
||||||
|
|
||||||
/* Set this new server ID. */
|
/* Set this new server ID. */
|
||||||
|
Loading…
Reference in New Issue
Block a user