agora inbox for pgpool-committers@postgresql.org
help / color / mirror / Atom feedpgpool: Fix heartbeat device treatment.
2+ messages / 1 participants
[nested] [flat]
* pgpool: Fix heartbeat device treatment.
@ 2025-06-14 11:30 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tatsuo Ishii @ 2025-06-14 11:30 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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=f88b1c18f68c9d57ddbf92499b8fedc01f26e...
Modified Files
--------------
src/watchdog/wd_heartbeat.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgpool: Fix heartbeat device treatment.
@ 2025-06-14 11:30 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tatsuo Ishii @ 2025-06-14 11:30 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=e5564eb541af139fe825e1563e3ca0a6d5225...
Modified Files
--------------
src/watchdog/wd_heartbeat.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-06-14 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-14 11:30 pgpool: Fix heartbeat device treatment. Tatsuo Ishii <ishii@postgresql.org>
2025-06-14 11:30 pgpool: Fix heartbeat device treatment. Tatsuo Ishii <ishii@postgresql.org>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox