Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSL verification fail bug when Kafka endpoint is a FQDN with a do… #4991

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/rdkafka_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@ void rd_kafka_transport_post_connect_setup(rd_kafka_transport_t *rktrans) {
* Locality: broker thread
*/
static void rd_kafka_transport_connected(rd_kafka_transport_t *rktrans) {
// If the domain name is an FQDN, remove the trailing dot
char* dot = strrchr(rktrans->rktrans_rkb->rkb_nodename, '.');
if (dot != NULL && (dot[1] == ':' || dot[1] == '\0'))
memmove(dot, &dot[1], strlen(&dot[1]) + 1);

rd_kafka_broker_t *rkb = rktrans->rktrans_rkb;

rd_rkb_dbg(
Expand Down