public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuo Ishii <[email protected]>
To: [email protected]
Subject: pgpool: Fix heartbeat device treatment.
Date: Sat, 14 Jun 2025 11:30:29 +0000
Message-ID: <[email protected]> (raw)

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(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgpool: Fix heartbeat device treatment.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox