Bug 260904 - net-mgmt/lldpd: Fails to acquire lock on lldpd.socket
Summary: net-mgmt/lldpd: Fails to acquire lock on lldpd.socket
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-03 10:28 UTC by Luiz Amaral
Modified: 2022-03-13 19:20 UTC (History)
2 users (show)

See Also:
freebsd: maintainer-feedback+


Attachments
Upgrade port to 1.0.13 (872 bytes, patch)
2022-01-18 10:05 UTC, Luiz Amaral
no flags Details | Diff
Upgrade port to 1.0.13 and fix build on CURRENT (2.00 KB, patch)
2022-03-09 14:51 UTC, Luiz Amaral
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Amaral 2022-01-03 10:28:35 UTC
I am currently running lldpd version 1.0.8_1 on FreeBSD 13.0 and when I try to change any configuration via lldpcli, I get warned of a failure to acquire a lock on the socket and the configuration doesn't get applied. 

[lldpcli] # configure system description test
2022-01-03T11:10:02 [WARN/lldpctl] cannot get lock on /var/run/lldpd.socket: Bad file descriptor

Configuration from the configuration file also doesn't get applied due to the same issue. 

A fix for this has already been merged upstream (https://github.com/lldpd/lldpd/issues/445) and included in release 1.0.12.
Comment 1 Luiz Amaral 2022-01-18 10:05:10 UTC
Created attachment 231116 [details]
Upgrade port to 1.0.13

I attached a patch with the required update.
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2022-02-10 16:49:47 UTC
(In reply to Luiz Amaral from comment #1)
On FreeBSD current, amd64, it fails to compile:

--- liblldpd_la-interfaces-bsd.lo ---
In file included from interfaces-bsd.c:33:
In file included from /usr/include/net/if_bridgevar.h:84:
/usr/include/net/ethernet.h:62:8: fatal error: redefinition of 'ether_header'
struct ether_header {
       ^
../../include/netinet/if_ether.h:72:8: note: previous definition is here
struct  ether_header {
        ^
1 error generated.
*** [liblldpd_la-interfaces-bsd.lo] Error code 1
Comment 3 Luiz Amaral 2022-02-10 17:10:27 UTC
Thanks for having a look.

I am building it on 13.0 stable, so I didn't get errors. I'll prepare a VM with current and see if I can get that fixed.
Comment 4 Luiz Amaral 2022-03-09 14:51:10 UTC
Created attachment 232346 [details]
Upgrade port to 1.0.13 and fix build on CURRENT

I made this new patch containing the changes to upgrade port to 1.0.13 and a fix for building it on CURRENT. 

I tested the build on 13.0-RELEASE and it also works there.

I contributed the changes to upstream as well:
https://github.com/lldpd/lldpd/pull/503/
Comment 5 Mathieu Simon 2022-03-13 15:39:14 UTC
Hi

And sorry for the long wait. For quite some time I had no more access to a Test environment which my previous job "sponsored" somee resources.

Please go ahead and include and consider this a "positive nod" from me.

Regards
Mathieu
Comment 6 Mathieu Simon 2022-03-13 15:44:05 UTC
Oh and I also wanted to specifically thank you Luiz for offering the diff upstream. I see Vincent remains the same kind of nice upstream "shepherd" when it comes to bug reports and pull requests. :-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-03-13 19:19:57 UTC
A commit in branch main references this bug:

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

commit 99a5f6d49b156b90dddbe435286c7d50eaae93ea
Author:     Luiz Amaral <email@luiz.eng.br>
AuthorDate: 2022-03-13 19:14:05 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2022-03-13 19:19:10 +0000

    net-mgmt/lldpd: update 1.0.8 -> 1.0.13

    PR:             260904
    Approved by:    Mathieu Simon <freebsd@simweb.ch> (maintainer)
    Relnotes:       https://github.com/lldpd/lldpd/releases/tag/1.0.9
                    https://github.com/lldpd/lldpd/releases/tag/1.0.10
                    https://github.com/lldpd/lldpd/releases/tag/1.0.11
                    https://github.com/lldpd/lldpd/releases/tag/1.0.12
                    https://github.com/lldpd/lldpd/releases/tag/1.0.13

 net-mgmt/lldpd/Makefile                             |  9 +++++----
 net-mgmt/lldpd/distinfo                             |  6 +++---
 net-mgmt/lldpd/files/patch-src_daemon_lldpd.h (new) | 13 +++++++++++++
 3 files changed, 21 insertions(+), 7 deletions(-)
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 2022-03-13 19:20:08 UTC
Committed, thanks!