Re: [Dnsmasq-discuss] Lease comes back after removing, DBus

2019-06-26 Thread Geert Stappers
On Wed, Jun 26, 2019 at 06:20:32PM -0700, A C wrote:
> On 2019-06-26 13:32, Geert Stappers wrote:
> > On 24-06-2019 02:38, A C wrote:

> > On 23-06-2019 08:06, A C wrote:
> >
> >> I'm having trouble removing leases from my system.
...
> >> There seems to be some kind of persistence that exists outside of just
> >> the lease file but I don't know where that is.  This isn't the first
> >> time this has happened and it's happened with different embedded devices
> >> and non-embedded devices (cameras, AP's, IoTs, phones, etc.) there just
> >> seems to be sticky lease data somewhere.
> >>
> > You are probadly right about the "sticky lease data somewhere"
> > (I'm not comfortable to say "you are right about sticky lease data" )
> > 
> > The lease file I removed had size of zero bytes.
> > 
> > My (educated??) guess is that lease data is stored in Dbus.
> > My only point to back that up, is `dnsmasq -v` showing "DBus"
> 
> Yes, my copy does have DBus support.  I've turned on dbus-monitor to see
> if anything shows up at the next lease update.  There's enough devices I
> shouldn't have to wait long.

This email is to express that I'm looking forward to those test results.


Groeten
Geert Stappers


P.S.

The addition of 'DBus' to the subject is for inviting
mailinglist subscribers in this discussion.
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Welcome back, Honor assigning IPv6 address based on MAC address

2019-06-26 Thread Geert Stappers
On Thu, Jun 27, 2019 at 12:06:31AM +0100, Roy Marples wrote:
> On 26/06/2019 21:16, Oliver Freyermuth wrote:
> > Am 26.06.19 um 21:49 schrieb Pali Rohár:
> > > So, could somebody review and comment my patch?
> > 
> > Just to add on this:
> > I'm also using this patch in production since over a month now and it works 
> > very well for me (with dnsmasq 2.80).
> > Would really love to see this upstream.
> 
> Based on mailing list activity, Simon isn't involved much for reasons
> unknown. I suggest we pester him when he returns :)

Seen the transmitted smiley,  hopefully is indeed a smiley recieved.

When Simon returns we just should say   Welcome back
And we already can start with expressing

   Welcome back


Simply because there is life outside this mailinglist.


> Just to chime in, I'm using this in production as well with good success as
> well, even though it does go against some DHCP6 designs.

Thanks for reporting that


Groeten
Geert Stappers
-- 
Leven en laten leven


signature.asc
Description: PGP signature
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Lease comes back after removing

2019-06-26 Thread A C
On 2019-06-26 13:32, Geert Stappers wrote:
> On 24-06-2019 02:38, A C wrote:
> 
>> On 2019-06-23 11:08, Geert Stappers wrote:
>>> On Sun, Jun 23, 2019 at 09:33:21AM -0700, A C wrote:
 On 2019-06-23 03:32, Geert Stappers wrote:
> On 23-06-2019 08:06, A C wrote:
>
>> I'm having trouble removing leases from my system.
>> I have:
>>
>> /etc/dnsmasq.conf:
>> read-ethers ###(there is a dash)
>> dhcp-range=10.0.200.100,10.0.200.105,255.255.0.0,12h
>> ### My netmask is actually 255.255.0.0 on the network, all dhcp leases
>> are in 10.0.200.x, static assignments are in other subnets
>>
>> /etc/ethers:
>> 00:25:9C:1C:0A:C3 ap.lan
>> ### and others
>>
>> /etc/hosts:
>> 10.0.0.252  ap.lan
>> ### and others
>>
>>
>> How can I fully purge the lease and get it to start over?  The client is
>> an embedded device and has no memory of the lease once I power cycle it
>> so somehow dnsmasq is remembering even though the lease file was purged.
>>
> Recently I had simular sympthoms, infact still have them.
>
>
> My only issue is when I forget to add a client to the list
> prior to first putting it online and it acquires a lease from the DHCP
> lease pool instead of the IP I want to give it via the combination of
> ethers/hosts.  After that I have extreme difficulty purging the lease to
> force a new address.
>>> My /etc/ethers has a line like
>>>
>>> 00:02:b0:ef:f0:ef  kornuit
>>>
>>> Doing `host kornuit` returns correctly the IPv4 address that is in DNS.
>>> (other DNS as dnsmasq  ( no kornuit entry in /etc/hosts ))
>>>
>>>
>>> I also stopped dnsmasq, removed the lease file and restarted dnsmasq.
>>>
>>> Did another PXE netboot  ( consider it an embedded device, it has no
>>> memory of previous lease )
>>>
>>> Server kornuit got the IPv4 address as before, one from the Dnsmasq
>>> DHCP range. Where it looks like a persistent DHCP lease, do I think
>>> that it is algoritme that hands out each time the same IPv4 address.
>>>
>>> Thing I need to verify is if dnsmasq does do a DNS-lookup on 'kornuit'
>>> after reading /etc/ethers.
> 
> Now using  `dhcp-host=MA:CA:DD:RE:SS,192.0.2.42
> 
>> host ap.lan localhost (run on the same server as dnsmasq) returns
>> 10.0.0.252 as expected.
>>
>> Turned off the device, stopped dnsmasq, removed the lease from the lease
>> file, restarted dnsmasq and then restarted the device.  I get the old
>> DHCP range lease instead of the one defined in hosts.
>>
>> If I add a host entry (with an IP outside of the DHCP range) and an
>> ethers entry for a device bore I ever plug it into the network I will
>> correctly get a static lease of the IP I define in hosts.  If I forget
>> to do that, the device picks up a lease from the DHCP range and then
>> it's a massive fight to get rid of it.  Sometimes I have to leave the
>> device disconnected for a few days so the lease expires on its own
>> (regardless of deleting the lease) and then I can switch the IP.
>>
>> There seems to be some kind of persistence that exists outside of just
>> the lease file but I don't know where that is.  This isn't the first
>> time this has happened and it's happened with different embedded devices
>> and non-embedded devices (cameras, AP's, IoTs, phones, etc.) there just
>> seems to be sticky lease data somewhere.
>>
> You are probadly right about the  "sticky lease data somewhere"
> 
> (I'm not comfortable to say "you are right about sticky lease data" )
> 
> 
> The lease file I removed had size of zero bytes.
> 
> 
> My (educated??) guess is that lease data is stored in Dbus.
> 
> My only point to back that up, is `dnsmasq -v` showing  "DBus"

Yes, my copy does have DBus support.  I've turned on dbus-monitor to see
if anything shows up at the next lease update.  There's enough devices I
shouldn't have to wait long.


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Honor assigning IPv6 address based on MAC address

2019-06-26 Thread Roy Marples

On 26/06/2019 21:16, Oliver Freyermuth wrote:

Am 26.06.19 um 21:49 schrieb Pali Rohár:

So, could somebody review and comment my patch?


Just to add on this:
I'm also using this patch in production since over a month now and it works 
very well for me (with dnsmasq 2.80).
Would really love to see this upstream.


Based on mailing list activity, Simon isn't involved much for reasons 
unknown. I suggest we pester him when he returns :)


Just to chime in, I'm using this in production as well with good success 
as well, even though it does go against some DHCP6 designs.


Roy

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Honor assigning IPv6 address based on MAC address

2019-06-26 Thread Oliver Freyermuth
Am 26.06.19 um 21:49 schrieb Pali Rohár:
> On Saturday 11 May 2019 17:42:54 Kevin Darbyshire-Bryant wrote:
>>> On 6 Apr 2019, at 12:01, Geert Stappers  wrote:
>>>
>>> On Mon, Apr 01, 2019 at 01:02:20AM +0200, Pali Rohár wrote:
 On Tuesday 12 February 2019 13:41:43 Geert Stappers wrote:
> On 06-02-2019 21:29, Pali Rohár wrote:
>> On Friday 11 January 2019 17:52:43 Pali Rohár wrote:
>>> On Monday 17 December 2018 18:41:09 Pali Rohár wrote:
 Currently IPv6 addresses are assigned to tuple (IAID, DUID). When 
 system
 changes IAID/DUID then old assigned IPv6 address cannot be reused, even
 when in config file was DHCPv6 assignment based on MAC address (and 
 not on
 DUID).
>>>
>>>   ...
>>>
>>> Hello, can somebody look at this patch?
>>>
>>> I remember that more people asked for ability to assign IPv6 address
>>> based on MAC address specified in config file, rather then IAID/DUID.
>>>
>> PING
>>
> Another request for
>
> Hey, could this patch get reviewed?
>
>
 Hello, can somebody review this patch?

>>>
>>> FWIW
>>>
>>> * The (four months old) patch does get applied cleanly.
>>> * My compiler is happy with it
>>> * Executable remains running upon start ( no early crash )
>>> * I'm unable to test the (new) IPv6 functionality
>>>
>>>
>>> Where in the "patch pipeline" is Pali's patch?
>>>
>>>
>>> Regards
>>> Geert Stappers
>>
>> I’ve been using this patch to tame qnap’s frustrating dhcpv6 assignment 
>> limitations for many months.  It’s immensely useful.
>>
>>
>> Cheers,
>>
>> Kevin D-B
> 
> So, could somebody review and comment my patch?

Just to add on this: 
I'm also using this patch in production since over a month now and it works 
very well for me (with dnsmasq 2.80). 
Would really love to see this upstream. 

Cheers,
Oliver

> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 



signature.asc
Description: OpenPGP digital signature
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Lease comes back after removing

2019-06-26 Thread Geert Stappers
On 24-06-2019 02:38, A C wrote:

> On 2019-06-23 11:08, Geert Stappers wrote:
>> On Sun, Jun 23, 2019 at 09:33:21AM -0700, A C wrote:
>>> On 2019-06-23 03:32, Geert Stappers wrote:
 On 23-06-2019 08:06, A C wrote:

> I'm having trouble removing leases from my system.
> I have:
>
> /etc/dnsmasq.conf:
> read-ethers ###(there is a dash)
> dhcp-range=10.0.200.100,10.0.200.105,255.255.0.0,12h
> ### My netmask is actually 255.255.0.0 on the network, all dhcp leases
> are in 10.0.200.x, static assignments are in other subnets
>
> /etc/ethers:
> 00:25:9C:1C:0A:C3 ap.lan
> ### and others
>
> /etc/hosts:
> 10.0.0.252  ap.lan
> ### and others
>
>
> How can I fully purge the lease and get it to start over?  The client is
> an embedded device and has no memory of the lease once I power cycle it
> so somehow dnsmasq is remembering even though the lease file was purged.
>
 Recently I had simular sympthoms, infact still have them.


 My only issue is when I forget to add a client to the list
 prior to first putting it online and it acquires a lease from the DHCP
 lease pool instead of the IP I want to give it via the combination of
 ethers/hosts.  After that I have extreme difficulty purging the lease to
 force a new address.
>> My /etc/ethers has a line like
>>
>> 00:02:b0:ef:f0:ef  kornuit
>>
>> Doing `host kornuit` returns correctly the IPv4 address that is in DNS.
>> (other DNS as dnsmasq  ( no kornuit entry in /etc/hosts ))
>>
>>
>> I also stopped dnsmasq, removed the lease file and restarted dnsmasq.
>>
>> Did another PXE netboot  ( consider it an embedded device, it has no
>> memory of previous lease )
>>
>> Server kornuit got the IPv4 address as before, one from the Dnsmasq
>> DHCP range. Where it looks like a persistent DHCP lease, do I think
>> that it is algoritme that hands out each time the same IPv4 address.
>>
>> Thing I need to verify is if dnsmasq does do a DNS-lookup on 'kornuit'
>> after reading /etc/ethers.

Now using  `dhcp-host=MA:CA:DD:RE:SS,192.0.2.42

> host ap.lan localhost (run on the same server as dnsmasq) returns
> 10.0.0.252 as expected.
>
> Turned off the device, stopped dnsmasq, removed the lease from the lease
> file, restarted dnsmasq and then restarted the device.  I get the old
> DHCP range lease instead of the one defined in hosts.
>
> If I add a host entry (with an IP outside of the DHCP range) and an
> ethers entry for a device bore I ever plug it into the network I will
> correctly get a static lease of the IP I define in hosts.  If I forget
> to do that, the device picks up a lease from the DHCP range and then
> it's a massive fight to get rid of it.  Sometimes I have to leave the
> device disconnected for a few days so the lease expires on its own
> (regardless of deleting the lease) and then I can switch the IP.
>
> There seems to be some kind of persistence that exists outside of just
> the lease file but I don't know where that is.  This isn't the first
> time this has happened and it's happened with different embedded devices
> and non-embedded devices (cameras, AP's, IoTs, phones, etc.) there just
> seems to be sticky lease data somewhere.
>
You are probadly right about the  "sticky lease data somewhere"

(I'm not comfortable to say "you are right about sticky lease data" )


The lease file I removed had size of zero bytes.


My (educated??) guess is that lease data is stored in Dbus.

My only point to back that up, is `dnsmasq -v` showing  "DBus"



Cheers

Geert Stappers




___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Honor assigning IPv6 address based on MAC address

2019-06-26 Thread Pali Rohár
On Saturday 11 May 2019 17:42:54 Kevin Darbyshire-Bryant wrote:
> > On 6 Apr 2019, at 12:01, Geert Stappers  wrote:
> > 
> > On Mon, Apr 01, 2019 at 01:02:20AM +0200, Pali Rohár wrote:
> >> On Tuesday 12 February 2019 13:41:43 Geert Stappers wrote:
> >>> On 06-02-2019 21:29, Pali Rohár wrote:
>  On Friday 11 January 2019 17:52:43 Pali Rohár wrote:
> > On Monday 17 December 2018 18:41:09 Pali Rohár wrote:
> >> Currently IPv6 addresses are assigned to tuple (IAID, DUID). When 
> >> system
> >> changes IAID/DUID then old assigned IPv6 address cannot be reused, even
> >> when in config file was DHCPv6 assignment based on MAC address (and 
> >> not on
> >> DUID).
> > 
> >   ...
> > 
> > Hello, can somebody look at this patch?
> > 
> > I remember that more people asked for ability to assign IPv6 address
> > based on MAC address specified in config file, rather then IAID/DUID.
> > 
>  PING
>  
> >>> Another request for
> >>> 
> >>> Hey, could this patch get reviewed?
> >>> 
> >>> 
> >> Hello, can somebody review this patch?
> >> 
> > 
> > FWIW
> > 
> > * The (four months old) patch does get applied cleanly.
> > * My compiler is happy with it
> > * Executable remains running upon start ( no early crash )
> > * I'm unable to test the (new) IPv6 functionality
> > 
> > 
> > Where in the "patch pipeline" is Pali's patch?
> > 
> > 
> > Regards
> > Geert Stappers
> 
> I’ve been using this patch to tame qnap’s frustrating dhcpv6 assignment 
> limitations for many months.  It’s immensely useful.
> 
> 
> Cheers,
> 
> Kevin D-B

So, could somebody review and comment my patch?

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: PGP signature
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] nettle 3.5 breaks build of dnsmasq

2019-06-26 Thread Vladislav Grishenko
Hi Juergen,

Temporary workaround/patch is here
https://github.com/themiron/dnsmasq/commit/6fd9aba7abe1e084123bc5002959350897774ace

Best Regards, Vladislav Grishenko

-Original Message-
From: Dnsmasq-discuss  On 
Behalf Of Juergen Daubert
Sent: Wednesday, June 26, 2019 4:57 PM
To: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: [Dnsmasq-discuss] nettle 3.5 breaks build of dnsmasq

Hi,

just discovered that new version 3.5 of nettle breaks building dnsmasq 2.80:

make COPTS=-DHAVE_DNSSEC

crypto.c: In function 'dnsmasq_ecdsa_verify':
crypto.c:297:36: error: 'nettle_secp_256r1' undeclared (first use in this 
function); did you mean 'nettle_get_secp_256r1'?
nettle_ecc_point_init(key_256, _secp_256r1);
^
nettle_get_secp_256r1
crypto.c:297:36: note: each undeclared identifier is reported only once for 
each function it appears in
crypto.c:310:36: error: 'nettle_secp_384r1' undeclared (first use in this 
function); did you mean 'nettle_get_secp_384r1'?
nettle_ecc_point_init(key_384, _secp_384r1);
^
nettle_get_secp_384r1
make[1]: *** [/tmp/dnsmasq-2.80/Makefile:161: crypto.o] Error 1


thanks
Juergen


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] nettle 3.5 breaks build of dnsmasq

2019-06-26 Thread Juergen Daubert
Hi,

just discovered that new version 3.5 of nettle breaks building dnsmasq 2.80:

make COPTS=-DHAVE_DNSSEC

crypto.c: In function 'dnsmasq_ecdsa_verify':
crypto.c:297:36: error: 'nettle_secp_256r1' undeclared (first use in this 
function); did you mean 'nettle_get_secp_256r1'?
nettle_ecc_point_init(key_256, _secp_256r1);
^
nettle_get_secp_256r1
crypto.c:297:36: note: each undeclared identifier is reported only once for 
each function it appears in
crypto.c:310:36: error: 'nettle_secp_384r1' undeclared (first use in this 
function); did you mean 'nettle_get_secp_384r1'?
nettle_ecc_point_init(key_384, _secp_384r1);
^
nettle_get_secp_384r1
make[1]: *** [/tmp/dnsmasq-2.80/Makefile:161: crypto.o] Error 1


thanks
Juergen


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss