Bug 271508 - net/mpd5: Link auto-redial after SIGUSR2
Summary: net/mpd5: Link auto-redial after SIGUSR2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Eugene Grosbein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-19 11:04 UTC by mickey242
Modified: 2023-05-20 11:41 UTC (History)
0 users

See Also:
eugen: maintainer-feedback+


Attachments
Patch to keep link closed after USR2 signal until USR1 is received. (920 bytes, patch)
2023-05-19 11:04 UTC, mickey242
no flags Details | Diff
proposed fix (2.00 KB, patch)
2023-05-19 12:12 UTC, Eugene Grosbein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mickey242 2023-05-19 11:04:56 UTC
Created attachment 242273 [details]
Patch to keep link closed after USR2 signal until USR1 is received.

Since sometime around end of 2022 mpd5 after being sent a USR2 signal to close the first link, automatically brings the link back up again without waiting to receive a USR1 signal. Probably a side effect of patch-redial.
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2023-05-19 12:12:47 UTC
Created attachment 242276 [details]
proposed fix

Please test this patch instead. Download it to /usr/ports/net/mpd5/patch-sigusr then rebuild, reinstall and restart mpd5.
Comment 2 mickey242 2023-05-19 19:46:13 UTC
(In reply to Eugene Grosbein from comment #1)

Saved your patch to /usr/ports/net/mpd5/files/patch-sigusr, rebuilt, reinstalled and restarted mpd5, then tested bringing the link down then up again using USR2 and USR1 signals. Works for me, after SIGUSR2, link stays down until receipt of SIGUSR1.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-05-20 11:23:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a022a2a4c48c341256a1d4f53b2be12ac31239c7

commit a022a2a4c48c341256a1d4f53b2be12ac31239c7
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2023-05-20 11:15:11 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2023-05-20 11:22:39 +0000

    net/mpd5: new small feature and bugfix

    - Import r2539 from upstream: introduce new interface description conversion
      specification %s for last description change time, in unixtime (seconds).
    - Unbreak SIGUSR1/SIGUSR2 mechanics to open/close first link broken
      in mpd5-5.9_10 (*)

    PR:             271508 (*)

 net/mpd5/Makefile                  |  2 +-
 net/mpd5/files/patch-ifdescr (new) | 35 +++++++++++++++
 net/mpd5/files/patch-redial        | 92 ++++++++++++++++++++++++++++++++------
 3 files changed, 114 insertions(+), 15 deletions(-)
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2023-05-20 11:28:16 UTC
Thank you very much for the report!

Remove patch-sigusr and update your ports tree to get new revision mpd5-5.9_16 containing the fix.
Comment 5 mickey242 2023-05-20 11:41:28 UTC
(In reply to Eugene Grosbein from comment #4)

Update just came through, removed patch-sigusr and reinstalled mpd5.
Thank you very much.