Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: LLDP daemon and display tool
To:
tech@openbsd.org
Date:
Fri, 25 Apr 2025 12:57:12 +0100

Download raw body.

Thread
On 2025/04/25 13:31, Claudio Jeker wrote:
> On Fri, Apr 25, 2025 at 11:36:50AM +0100, Stuart Henderson wrote:
> > On 2025/04/25 12:04, Henning Brauer wrote:
> > > * Stuart Henderson <stu@spacehopper.org> [2025-04-25 03:25]:
> > > > On 2025/04/24 10:38, Lyndon Nerenberg (VE7TFX/VE6BBM) wrote:
> > > > > This is great!  Some quick testing shows it correctly sees
> > > > > all the Fortinet and Juniper hardware on my networks.
> > > > > 
> > > > > But I would suggest just calling it lldp[d] right from the
> > > > > start.  I don't see a conflict as it's makes no sense to 
> > > > > run both this and ports at the same time.  And if they
> > > > > are both installed, the ports cli names don't collisde
> > > > > with this one's.
> > > > 
> > > > The rc.d scripts conflict.
> > > 
> > > then the ports one needs to be adjusted.
> > > 
> > > our ntpd is ntpd, not ontpd.
> > 
> > yes and we had a problem with that around 5.0-5.1
> > 
> > > our ldapd is ldapd, not oldapd.
> > 
> > no conflict
> > 
> > > our smtpd is smtpd, not osmtpd.
> > 
> > no conflict
> > 
> > > our bgpd is bgpd, not obgpd.
> > 
> > the possibly-conflicting rc script was named quagga_bgpd from the start
> > 
> > > and so on and so on.
> > 
> > the rc-script could be renamed, but:
> > 
> > 1. what to?
> > 
> > 2. unless it's renamed in the release _before_ this is added, upgrades
> > will be broken. user updates base from a version with ports lldpd
> > installed to a version with lldpd from base, so overwriting rc.d/lldpd.
> > updating packages at that point will _remove_ the rc.d/lldpd script.
> > 
> > if we want to reuse existing names of things from ports in base we
> > could really do with a separate namespace for ports and base rc.d scripts.
> 
> Would it be acceptable to use lldpd as program name but use rc.d/lldp as
> startup script?
> 
> The only other problem point would be the file in /var/run but I think
> that implies that someone wants to run both tools at the same time which
> IMO makes little sense and people can then use an overwrite to toggle the
> control socket path.
> 
> I would really like to see dlg's tool in our tree and it seems this is the
> main pain point.

Me too. Having something which is good enough for most use in base
would be useful.

The rc script name is the main problem for coexistence. Actual daemon
name is ok either way as they are in separate namespaces /usr/sbin
and /usr/local/sbin.

There's another minor one in that systems which already use Vincent
Bernat's lldpd from packages will have an _lldpd user but I don't think
lldpd will need to own any files in base*.tgz/etc.tgz so the actual
numeric value of the uid probably doesn't matter.

Packages lldpd uses /var/run/lldpd.socket and dlg's
/var/run/(o)lldpd.sock so there's no conflict in /var/run filenames.

$ ls -laR /var/run/lldpd*
-rw-r--r--  1 root    wheel   5 Apr  9 10:12 /var/run/lldpd.pid
srwxrwx---  1 _lldpd  _lldpd  0 Apr  9 10:12 /var/run/lldpd.socket
-rwxrwx---  1 _lldpd  _lldpd  0 Apr  9 10:12 /var/run/lldpd.socket.lock

/var/run/lldpd:
total 12
drwxr-xr-x  3 _lldpd  wheel   512 Apr  9 10:12 .
drwxr-xr-x  8 root    wheel  1024 Apr 23 02:33 ..
drwxr-xr-x  2 root    wheel   512 Apr  9 10:12 etc

/var/run/lldpd/etc:
total 12
drwxr-xr-x  2 root    wheel  512 Apr  9 10:12 .
drwxr-xr-x  3 _lldpd  wheel  512 Apr  9 10:12 ..
-rw-r--r--  1 root    wheel  118 Apr  9 10:12 localtime