Eclipse BlueChi is a systemd service controller intended for multi-node environments with a predefined number of nodes and with a focus on highly regulated ecosystems such as those requiring functional safety.
If we try to read the IP address from a struct sockaddr_in while getpeername() filled it with struct sockaddr_in6 information, we are actually reading the sin6_flowinfo part of the struct sockaddr_in6. That flow information is usually zero, unless the connection is explicitely flagged with a flow ID. So we would read a zeroed IP address.
root@42dot-ak7:~# bluechictl status
NODE | STATE | IP | LAST SEEN
==========================================================================================
ak7_master_main | online | 0.0.0.0 | now
ak7_master_sub | online | 0.0.0.0 | now
TO-BE
root@42dot-ak7:~# bluechictl status
NODE | STATE | IP | LAST SEEN
==========================================================================================
ak7_master_main | online | ::ffff:192.168.16.103 | now
ak7_master_sub | online | ::ffff:192.168.16.104 | now
coverage: 85.15% (+0.07%) from 85.084%
when pulling 7271c8898c1d3729d88a2e8e34c75b0ad3150f04 on dofmind:fix-to-get-peer-ip-address
into 88afc8fea761434d5f7fba855f2024af83182a44 on eclipse-bluechi:main.
If we try to read the IP address from a struct sockaddr_in while getpeername() filled it with struct sockaddr_in6 information, we are actually reading the sin6_flowinfo part of the struct sockaddr_in6. That flow information is usually zero, unless the connection is explicitely flagged with a flow ID. So we would read a zeroed IP address.
Reference: https://stackoverflow.com/a/25640794
AS-IS
TO-BE