Re: [Dnsmasq-discuss] Compile-time options - taming the combinatorial explosion.

2018-11-01 Thread Shankar Unni
On Oct 25, 2018, at 4:24 PM, Kevin Darbyshire-Bryant 
 wrote:
> 
> 
> 
>> On 25 Oct 2018, at 21:38, Kevin Darbyshire-Bryant 
>>  wrote:
>> 
>> I think Openwrt is safe.   There will be a loud scream from me if it isn’t 
>> :-)
>> 
>> Cheers,
>> 
>> Kevin D-B
>> 
> 
> In fact to prove it to myself I had a go at removing the NO_FORK compile time 
> option (patch attached) and had no obvious problem with the resultant binary 
> on Openwrt.

Thanks for confirming that, Kevin.  Sorry for the quick mis-reading of the 
source, because I’d just been debugging around there earlier..


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


[Dnsmasq-discuss] Stumped

2018-11-01 Thread Petr Mensik
Hi Peter,

did you check what "pkg-config --libs nettle hogweed" returns in your
environment? If you want to prefer your own libraries, I think the
simplest way is to remove nettle-devel package, unless you want to build
your own package. Environment variables PKG_CONFIG_LIBDIR and
PKG_CONFIG_PATH may help you. Visit man pkg-config. It should include -L
flag with path in --libs, if installed to non-standard path.

Cheers,
Petr

On 10/31/2018 04:21 AM, Peter Nehem wrote:
> Hello All,
>  I'm stumped I've been trying to compile dnsmasq for Centos 7.5 because
> the version for Centos 7.5 doesn't have any of the extra features turned
> on, namely dnssec and several others. But I keep getting this error
> message no matter what I do:
> 
> ccache gcc -Wall -W -O2   -DVERSION='"2.76"' -I/usr/include/dbus-1.0
> -I/usr/lib64/dbus-1.0/include   -I/usr/local/include    -c
> dnssec.c   
> dnssec.c: In function ‘dnsmasq_ecdsa_verify’:
> dnssec.c:266:36: error: ‘nettle_secp_256r1’ undeclared (first use in
> this function)
>     nettle_ecc_point_init(key_256, &nettle_secp_256r1);
>     ^
> dnssec.c:266:36: note: each undeclared identifier is reported only once
> for each function it appears in
> dnssec.c:279:36: error: ‘nettle_secp_384r1’ undeclared (first use in
> this function)
>     nettle_ecc_point_init(key_384, &nettle_secp_384r1);
>     ^
> make[1]: *** [/mnt/sdb1/dnsmasq-2.76/Makefile:157: dnssec.o] Error 1
> make[1]: Leaving directory '/mnt/sdb1/dnsmasq-2.76/src'
> make: *** [Makefile:83: all] Error 2
> 
> I have gotten it in every version I've tried to compile. I've tried
> dnsmasq-master, dnsmasq-2.80, most recent snapshot, dnsmasq-2.76. I
> tried having it read from openssl-1.1.1 that I have complied for nginx,
> but that didn't work, so I recompiled Nettle-3.4 ( I used this for the
> configure line: ./configure --enable-fat --enable-gcov
> --disable-documentation --disable-arm-neon
> --with-include-path=/opt/openssl/include/openssl ) Took a few tried to
> finally get it to compile but I got it to use the files from
> openssl-1.1.1 so that Nettle would be up to the task.
> 
>  For each try I had to copy dbus.h from my includes folder because it
> will error out and it seems to like it right in the main folder, I've
> also tried copying the whole dbus folder from includes to the src
> folder, for 2.80 I copied the nettle includes into src because it
> couldn't find that as well.
> 
> These are the changes I did to config.h each time I tried to compile:
> This was for 2.7
> 
> #define DEFLEASE 86400 /* default lease time, 1 hour */
> #define CHUSER "dnsmasq"
> #define CHGRP "dnsmasq"
> 
> #define HAVE_LUASCRIPT */
> #define HAVE_DBUS */
> #define HAVE_IDN */
> #define HAVE_CONNTRACK */
> #define HAVE_DNSSEC */
> 
> #define LEASEFILE "/var/lib/dnsmasq/dnsmasq.leases"
> 
> For 2.8
> #define HAVE_LUASCRIPT
> #define HAVE_DBUS
> #define HAVE_IDN
> #define HAVE_LIBIDN2
> #define HAVE_CONNTRACK
> #define HAVE_DNSSEC
> 
> In the makefile I chg Lua to 5.3 because Centos only has 5.1 and I added
> this for 2.8 LIBS  = -L/usr/local/lib64 - this time I didn't copy over
> the nettle includes:
> 
> crypto.c: In function ‘dnsmasq_ecdsa_verify’:
> crypto.c:297:36: error: ‘nettle_secp_256r1’ undeclared (first use in
> this function)
>     nettle_ecc_point_init(key_256, &nettle_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)
>     nettle_ecc_point_init(key_384, &nettle_secp_384r1);
>     ^
> make[1]: *** [/mnt/sdb1/dnsmasq-2.80/Makefile:161: crypto.o] Error 1
> make[1]: Leaving directory '/mnt/sdb1/dnsmasq-2.80/src'
> make: *** [Makefile:86: all] Error 2
> 
> This is line 297: nettle_ecc_point_init(key_256, &nettle_secp_256r1);
> This is line 310: nettle_ecc_point_init(key_384, &nettle_secp_384r1);
> 
> I looked through openssl to try and see how the defined this and I can't
> remember where it was at
> 
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

-- 
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemen...@redhat.com  PGP: 65C6C973



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


Re: [Dnsmasq-discuss] Asigning IP DHCP IP by device type.

2018-11-01 Thread Petr Mensik
I think dhcp-option, dhcp-vendorclass, dhcp-mac, dhcp-match and using
tags is what you are looking for. I am afraid dnsmasq does not document
what kind of devices send what parameters. It should be somehow simple
to identify iOS, it might be more difficult with androids. I think they
all present hostname beginning with android-*. Never tried to use it
myself however. dhcp-range can be different for different tags.

On 10/28/2018 01:58 PM, Ramses wrote:
> Hi everybody,
> 
> I have a doubt and I can't found a solution...
> 
> Does anybody know, and can day me, if there is any way to configure DNSMasq 
> to asign IP depending if device type that requests the IP?
> 
> I want to define various IP Ranges to asign the IP depending, by example, if 
> the request came from smartphones (Android / IOS) or others.
> 
> 
> Regards,
> 
> Ramsés
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

-- 
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemen...@redhat.com  PGP: 65C6C973

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


Re: [Dnsmasq-discuss] DHCP Logging

2018-11-01 Thread Petr Mensik
Hi Tony,

I think dhcp-script can be used to log any information related to dhcp
assignments in custom format. I think basic dhcp request informations is
logged even without log-dhcp. Have you checked syslog or journalctl?

Example from libvirt instance:
DHCPOFFER(virbr0) 192.168.122.161 52:54:00:4b:aa:67

Is that enough? Is something important missing?

On 10/28/2018 03:15 AM, Tony White wrote:
> Hi folks,
>  I am hoping I have missed the option to log all
> dhcp assignments.
>   The only one I have found id --log-dhcp which seems
> to log a lot more than time,date,ipaddress, mac address
> and lease time etc.
> 

-- 
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemen...@redhat.com  PGP: 65C6C973

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