From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
---|---|
To: | pgpool-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgpool: Fix heartbeat device treatment. |
Date: | 2025-06-14 11:30:24 |
Message-ID: | E1uQP5b-00AXvH-0j@gothos.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgpool-committers |
Fix heartbeat device treatment.
wd_create_hb_recv_socket() and wd_create_hb_send_socket() called
setsockopt(2) with wrong argument.
struct ifreq i;
strlcpy(i.ifr_name, hb_if->if_name, sizeof(i.ifr_name));
if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, &i, sizeof(i)) == -1)
:
This is not quite correct since the 4th argument should be
just a null terminated string (device name), not struct ifreq.
Discussion: [pgpool-hackers: 4602] heartbeat and SO_BINDTODEVICE
https://www.pgpool.net/pipermail/pgpool-hackers/2025-May/004603.html
Backpatch-through: v4.6
Branch
------
V4_6_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f88b1c18f68c9d57ddbf92499b8fedc01f26e52a
Modified Files
--------------
src/watchdog/wd_heartbeat.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2025-06-14 11:30:29 | pgpool: Fix heartbeat device treatment. |
Previous Message | Tatsuo Ishii | 2025-06-14 11:10:16 | pgpool: Fix resource leak in hearbeat receiver process. |