On 2024/03/03 18:32, Kirill A. Korinsky wrote:
> > +-my @LEASES = ('/var/db/dhcpd.leases', '/var/lib/dhcp/dhcpd.leases', 
> > '/var/lib/dhcp3/dhcpd.leases');
> > ++my @LEASES = ('/var/db/dhcpd/dhcpd.leases');
> 
> The patch need to be updates as well. Here should be two path which you
> defined in Makefile:
>  - /var/db/isc-dhcp/dhcpd.leases
>  - /var/db/isc-dhcp/dhcpd6.leases
> 
> Unfortently it reads the first file which exists and ignores the rest.

oops, I decided it should use /var/db/isc-dhcp rather than just
/var/db/dhcpd but forgot to update the patch to the contrib script.
(dhcpd6.leases won't be useful for this, the parser skips v6
addresses as invalid).

> > ++my @OUIS = ('/usr/local/share/arp-scan/ieee-oui.txt');
> 
> when it should be added as dependency, should it?
> 
> > ++          "             the default is to try 
> > /var/db/isc-dhcpd/dhcpd.leases\n".

It could be added, but it's not essential in order for the script to
work (and the script isn't needed for most people running the server)
so I thought I'd just adjust the warning message showing people want
to run if they want vendor names.

> > diff -N pkg/MESSAGE-main
> > --- /dev/null       1 Jan 1970 00:00:00 -0000
> > +++ pkg/MESSAGE-main        3 Mar 2024 17:03:51 -0000
> > @@ -0,0 +1,4 @@
> > +If updating from earlier than isc-dhcp-server-4.4.3pl1p1, move/copy old 
> > leases:
> > +# cd /var/db/isc-dhcp; mv ../dhcpd.leases .; chown _isc_dhcp:_isc_dhcp *
> > +If configuring from scratch, install an empty leases file:
> > +# install -o _isc_dhcp -g _isc_dhcp /dev/null /var/db/isc-dhcp/dhcpd.leases
> 
> Seems that dhcpd6.leases is missed here as well.
> 
> Thus, maybe keep things simple and do not split lease for IPv4 and IPv6? I
> haven't test it, but after fast look to the code [1]it seems that it should
> work if mix both leases into one file.

The port doesn't really handle running v6 mode anyway (it would want a
second rc.d script with -6 in flags and a separate config file, it can't
run 4+6 in the same process) so I think talking about v6 will just add
to confusion. If someone has worked out how to set things up to use
it for DHCPv6 already I expect they can extrapolate from the existing
MESSAGE.

I am pretty sure the two daemon instances will conflict if they use the
same lease database.

For now I'll commit what I have with the fixed path in
patch-contrib_dhcp-lease-list_pl

Reply via email to