Report IP address in disconnection error messages
This enables tools like fail2ban to work.
Reference: https://github.com/fail2ban/fail2ban/issues/3427#issuecomment-1339686038 Closes: https://github.com/eclipse-mosquitto/mosquitto/issues/2076
cc: @ralight
@ralight: I went through the hassle of signing the CLA. Can you have a look now?
Has been working great for me with fail2ban for months now:
server ~ # fail2ban-client status mosquitto |& head -n8
Status for the jail: mosquitto
|- Filter
| |- Currently failed: 0
| |- Total failed: 1621
| `- Journal matches: _SYSTEMD_UNIT=mosquitto.service + _COMM=mosquitto
`- Actions
|- Currently banned: 543
|- Total banned: 543
I have no idea what it takes to get any review in this project however.
I think it's probably a better idea to print the address separately rather than to piggy-back on the client id.
Thank you, this is a good idea. I've pushed it to the develop branch here 9d8dba19976d142afe5821115702bb78cdee4271 to become part of the upcoming 2.1 release - so I'm closing this PR