Bug 261205

Summary: net/quagga: add some fixes to the port from upstream
Product: Ports & Packages Reporter: Eugene Grosbein <eugen>
Component: Individual Port(s)Assignee: Eugene Grosbein <eugen>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix threading error that broke ripd in 1.2.4
none
patch-fdsetsize: fix memory corruption that may occur when limit.rlim_cur is less then FD_SETSIZE
none
patch-pqueue.c: prevent queue corruption when removing the last entry of queues none

Description Eugene Grosbein freebsd_committer freebsd_triage 2022-01-14 19:33:45 UTC
Development of the Quagga Project effectively ceased three years ago shortly after the release 1.2.4. However, there were three after-release commits to Quagga primary Git source repository:

https://gogs.quagga.net/Quagga/quagga/commit/1f918980c08d9fb9215609db39f7fb279c2e1807
https://gogs.quagga.net/Quagga/quagga/commit/e21719d8fa2b560d7cc9d1d9204bafee4984c577
https://gogs.quagga.net/Quagga/quagga/commit/b54de751ef72fa67749825a0ea30af7c22d575c5

Incomplete fix for first problem was added to the port with my PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238760

Please consider to add mentioned changes to the port in form of patches I'm attaching. If you like, I can commit it myself.

The first patch file patch-lib_thread.c should replace already exiting net/quagga/files/patch-lib_thread.c and others need to be added.
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2022-01-14 19:34:51 UTC
Created attachment 231009 [details]
Fix threading error that broke ripd in 1.2.4
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2022-01-14 19:36:43 UTC
Created attachment 231010 [details]
patch-fdsetsize: fix memory corruption that may occur when limit.rlim_cur is less then FD_SETSIZE
Comment 3 Eugene Grosbein freebsd_committer freebsd_triage 2022-01-14 19:38:10 UTC
Created attachment 231011 [details]
patch-pqueue.c: prevent queue corruption when removing the last entry of queues
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2022-01-14 19:39:22 UTC
(In reply to Eugene Grosbein from comment #1)

First attachment should be named patch-lib_thread.c
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2022-01-15 08:16:55 UTC
Thanks for the patches, please commit! I'm flooded with other work 8-(
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-01-15 09:48:48 UTC
A commit in branch main references this bug:

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

commit f29fab6043ae4e3a2d448406a6c900c26f41c353
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2022-01-15 09:42:20 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2022-01-15 09:48:03 +0000

    net/quagga: add three bugfixes from upstream

    This change imports three post-1.2.4 release changes
    from the primary Git repository of Quagga Project:

    1) Fix threading error that broke ripd:
    https://gogs.quagga.net/Quagga/quagga/commit/1f918980c08d9fb9215609db39f7fb279c2e1807

    2) Fix memory corruption that may occur
    when limit.rlim_cur is less then FD_SETSIZE:
    https://gogs.quagga.net/Quagga/quagga/commit/b54de751ef72fa67749825a0ea30af7c22d575c5

    3) Prevent queue corruption when removing the last entry of queues
    https://gogs.quagga.net/Quagga/quagga/commit/e21719d8fa2b560d7cc9d1d9204bafee4984c577

    PR:             261205
    Approved by:    pi (maintainer)

 net/quagga/Makefile                    |  2 +-
 net/quagga/files/patch-fdsetsize (new) | 21 +++++++++++++++++++++
 net/quagga/files/patch-lib_thread.c    | 28 ++++++++++++++++++++++------
 net/quagga/files/patch-pqueue.c (new)  | 14 ++++++++++++++
 4 files changed, 58 insertions(+), 7 deletions(-)