Re: [Dnsmasq-discuss] Dnsmasq domain configuration

2017-01-31 Thread Petr Mensik
Hi, I think you should use --domain local parameter. It will tell your clients to use common dns domain and would resolve such names in dnsmasq. Where are your DNS data stored? Do you use /etc/hosts for them? Do you have there fqdn with unqualified aliases? -- Petr Menšík Software Engineer Red

[Dnsmasq-discuss] Support of labels in --interface

2017-02-15 Thread Petr Mensik
Hi! I am new maintainer of dnsmasq package in RHEL. I am looking for potential problems with upgrade from dnsmasq 2.66 to version 2.76. And I have found something. Commit [1] changed behaviour of --interface eth0:0 behavior. The first problem is, manual page is not updated. It tells you cannot

Re: [Dnsmasq-discuss] Support of labels in --interface

2017-02-20 Thread Petr Mensik
sq-discuss] Support of labels in --interface -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 15/02/17 17:38, Petr Mensik wrote: > Hi! > Let's say my configuration is: 4: virbr0: > mtu 1500 qdisc noqueue state UP > group default qlen 1000 link/ether 52:54:00:2b:ee:d3 b

Re: [Dnsmasq-discuss] What's the easiest way to add some names to default dnsmasq in debian/ubuntu?

2017-03-06 Thread Petr Mensik
Hi Chris, I think you create some file, for exaqmple /etc/NetworkManager/dnsmasq.d/hosts.conf, containing addn-hosts=/etc/hosts.dnsmasq. Then you would have to create hosts.dnsmasq with hosts(5) format. Place odin there. 1.2.3.4 odin You could use some hook to NetworkManager to use create s

[Dnsmasq-discuss] Non-matching brackets in manual page

2017-03-09 Thread Petr Mensik
Hello, I got a report there are typos in manual page. Some brackets are not matching. I have attached suggested patch to them. Best Regards, Petr -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemen...@redhat.com PGP: 65C6C973 diff --git a/man/dnsmasq.8 b/man/dnsmasq.8

[Dnsmasq-discuss] [PATCH] Logging of dhcp_script output

2017-03-24 Thread Petr Mensik
Hi! Some guys using dnsmasq in virtual machines and OpenStack use custom dhcp_script to manage leases of clients. However they complain if there is anything wrong with them, then are just told broken pipe and no information. We understand it should not produce any output under normal operation.

Re: [Dnsmasq-discuss] [PATCH] Logging of dhcp_script output

2017-03-27 Thread Petr Mensik
7 13:38:17 -0400 (EDT) Petr Mensik wrote: > Hi! > > Some guys using dnsmasq in virtual machines and OpenStack use custom > dhcp_script to manage leases of clients. However they complain if > there is anything wrong with them, then are just told broken pipe and > no information. >

Re: [Dnsmasq-discuss] FW: Cachesize

2017-04-10 Thread Petr Mensik
Hi Nathan. If you hit a cache limit of 1 quite often, are you sure dnsmasq is still the best choice for that server? I think dnsmasq focuses on small home routers and end networks. Have you considered other caching resolver, unbound for example? I think if this limit is not enough, maybe yo

Re: [Dnsmasq-discuss] [PATCH] Logging of dhcp_script output

2017-04-19 Thread Petr Mensik
remaining bugs are mine, but Petr please check that I didn't break things. Cheers, Simon. On 24/03/17 17:38, Petr Mensik wrote: > Hi! > > Some guys using dnsmasq in virtual machines and OpenStack use custom > dhcp_script to manage leases of clients. > However they complain

Re: [Dnsmasq-discuss] [PATCH] Logging of dhcp_script output

2017-04-24 Thread Petr Mensik
/ email: pemen...@redhat.com PGP: 65C6C973 - Original Message - From: "Simon Kelley" To: "Petr Mensik" Cc: dnsmasq-discuss@lists.thekelleys.org.uk Sent: Sunday, April 23, 2017 3:14:08 PM Subject: Re: [Dnsmasq-discuss] [PATCH] Logging of dhcp_script output OK, there'

Re: [Dnsmasq-discuss] Per client dns spoof?

2017-04-26 Thread Petr Mensik
Hi Dax, I do not know any way to reply with different addresses based on source IPs. But I think you can use different technique, just have them ask to different dnsmasq instance that contains that blacklist. You can use DNAT to redirect their requests to dnsmasq on different IP. That would pro

[Dnsmasq-discuss] [PATCH] Various fixes detected by static analysis

2018-08-21 Thread Petr Mensik
Hi Simon and all others, I have tried running dnsmasq under coverity, static analysis tool. It found some warnings. I have fixed some things. Most obvious error was inconsistent handling of buffer length of interface names. Buffer size is IFNAMSIZ long, that is 16 bytes. But if interface should ha

Re: [Dnsmasq-discuss] multiple soa

2018-10-10 Thread Petr Mensik
Second soa in one zone cannot be added. One zone has one soa. Can you please share relevant configuration parts? On 10/09/2018 11:46 AM, Алексей Кузнецов wrote: > Hello, i set zone with soa record and its work fine. I want add second soa > zone but dnsmasq say dublicate options in config. How to a

[Dnsmasq-discuss] [PATCH] Simplify options flags

2018-10-24 Thread Petr Mensik
Hi! I have not managed it until dnsmasq 2.80 were out, but anyway. I have some proposal to simplify handling of options bits. Static analysis complains on compiler dead-code optimization. I propose having array instead. It adds few defines. But it allows adding any bits to defines and moving OPT_L

Re: [Dnsmasq-discuss] [PATCH] Simplify options flags

2018-10-25 Thread Petr Mensik
Thanks! On 10/24/2018 11:39 PM, Simon Kelley wrote: > On 24/10/2018 16:25, Petr Mensik wrote: >> Hi! >> >> I have not managed it until dnsmasq 2.80 were out, but anyway. I have >> some proposal to simplify handling of options bits. Static analysis >> complains o

[Dnsmasq-discuss] [PATCH] Free config file values on parsing errors.

2018-10-25 Thread Petr Mensik
Hi again. This time I have a little bit more controversal patches. But I think still useful. They fixes memory leaks that might occur in some cases. Most dnsmasq errors is fatal, so it does not matter. But some are not. Some parts are reloaded on SIGHUP signal, so it might leak more than once. So

Re: [Dnsmasq-discuss] [PATCH] Free config file values on parsing errors.

2018-10-26 Thread Petr Mensik
Additional patch that reduces some repeating parts. On 10/25/2018 10:36 AM, Petr Mensik wrote: > Hi again. > > This time I have a little bit more controversal patches. But I think > still useful. They fixes memory leaks that might occur in some cases. > Most dnsmasq errors is fa

[Dnsmasq-discuss] [PATCH] Free config file values on parsing errors.

2018-10-27 Thread Petr Mensik
Hi again. This time I have a little bit more controversal patches. But I think still useful. They fixes memory leaks that might occur in some cases. Most dnsmasq errors is fatal, so it does not matter. But some are not. Some parts are reloaded on SIGHUP signal, so it might leak more than once. So

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:4

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 ho

[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

Re: [Dnsmasq-discuss] DNS query random ports [PATCH]

2018-11-07 Thread Petr Mensik
Hi Simon, I am sure this is already an old issue. I forgot to mark patch presence in subject. I proposed a way to fallback to kernel assigned outgoing ports. Is it unacceptable? Have you even noticed the patches? Could you check if they could be used? I think any new deployments of dnsmasq would

[Dnsmasq-discuss] [PATCH] Re: dhcp-boot & dhcp-reply-delay optional tag fixes

2018-12-14 Thread Petr Mensik
Hi Kevin et al, sure, your fix is correct one. I just found one more place where tags were required. Your pointer handling is not as hopeless as you are saying. :) Sorry for inconvenience caused by my change. I miss some tests that would discover it, have to write them someday soon. Petr On 12/1

Re: [Dnsmasq-discuss] Determine wireless SSID

2019-01-28 Thread Petr Mensik
Hi Donald, it is kind of possible. But usually there is another way to solve your situation. First of all, you want to assign guests different addresses. Why would you want that? I think you want to separate them from internal network. Good design. However, that means they should be coming from d

[Dnsmasq-discuss] [PATCH] auth-server without interface

2019-02-15 Thread Petr Mensik
Hi! I was playing a bit with auth-vm and auth-server together with virtual machine manager. I think it might be useful to omit interface in auth-server at all, just change name reported by auth-vm zones on normal dns port. Libvirt uses dnsmasq as DHCP and DNS server on each virtual network config

Re: [Dnsmasq-discuss] dry run mode

2019-02-15 Thread Petr Mensik
I think tools from contrib/lease-tools might help you with that. It makes dnsmasq to release some lease on demand. If you shut down VM, it can be used to free its former lease. I think also d-bus API can be used for the same thing, it might be more reliable. On 2/11/19 9:43 PM, Graeme Peterson wr

[Dnsmasq-discuss] Authoritative zone and no recursion replies

2019-02-15 Thread Petr Mensik
Hi everyone. I think it is handy to be able to delegate some suffix from internal domain, lets say example.com provided by BIND or any bigger server. But recursive servers do not set recursive queries on normal delegation. Delegation is when I just add line into zone file: $ORIGIN example.com. dn

[Dnsmasq-discuss] dnsmasq interaction with nonrecursive requests

2019-04-12 Thread Petr Mensik
Hi, I was checking latest dnsmasq reponses to non-recursive queries. It seems strange, it does not work as it should. Originally, I was checking NXDOMAIN issue, reported on Fedora bug #1647464. But this issue seems important, it makes difficult to use dnsmasq with bigger resolvers like bind or un

Re: [Dnsmasq-discuss] [PATCH] dnsmasq interaction with nonrecursive requests

2019-04-12 Thread Petr Mensik
I have prepared patch that allows again queries to dnsmasq without rd bit set. It allows queries to locally defined names even without rd bit, but stil refuses queries to cached remote records. I think this is important issue, could it be reviewed? On 4/12/19 11:29 AM, Petr Mensik wrote: >

Re: [Dnsmasq-discuss] [PATCH] auth-server without interface

2019-04-12 Thread Petr Mensik
initialized to good enough value, contact and primary server are not mandatory for normal operation. Patch changing it to warning included. On 3/7/19 6:12 PM, Simon Kelley wrote: > On 15/02/2019 12:09, Petr Mensik wrote: >> Hi! >> >> I was playing a bit with auth-vm and auth

Re: [Dnsmasq-discuss] Strategies for DNS and DHCP backup

2019-04-12 Thread Petr Mensik
Never tried it myself, but if you synchronize configuration from primary to secondary server, it might work somehow together. Consider setting dhcp-authoritative on primary instance, but make sure it is not there on secondary. You may want to use different dhcp-range, so dynamically allocated host

Re: [Dnsmasq-discuss] Authoritative zone and no recursion replies

2019-04-12 Thread Petr Mensik
Notes below On 3/7/19 6:09 PM, Simon Kelley wrote: > On 15/02/2019 12:54, Petr Mensik wrote: >> Hi everyone. >> >> I think it is handy to be able to delegate some suffix from internal >> domain, lets say example.com provided by BIND or any bigger server. But >

[Dnsmasq-discuss] [PATCH] Issues with TCP queries on recreated interfaces.

2019-07-09 Thread Petr Mensik
://bugzilla.redhat.com/show_bug.cgi?id=1721668 -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemen...@redhat.com PGP: 65C6C973 From c9cc7aa2fb5463626bf6795531390ca3f2d2752b Mon Sep 17 00:00:00 2001 From: Petr Mensik Date: Tue, 9 Jul 2019 14:05:59 +0200 Subject: [PATCH 3/3

Re: [Dnsmasq-discuss] REFUSED PTR queries without recursion desired

2019-07-10 Thread Petr Mensik
Hi Chiang, I discovered the same issue and even posted patch on 2019-04-12 [1]. Queries without RD flag are always forwarded to "upstream" server, not answered locally. REFUSED is usually given by server dnsmasq points to, dnsmasq is just passing it to you. It should be fixed, but no reply for it

Re: [Dnsmasq-discuss] NXDOMAIN on exisiting A record

2019-07-10 Thread Petr Mensik
Hello Alex, I would try removing all-servers and clear-on-reload statements away. I would use just one server for testing, retesting all of them for the same behaviour. When you do not know which server is used, it is hard to debug better. I think dots in server=/.X/ are not necessary and maybe e

Re: [Dnsmasq-discuss] [PATCH] Issues with TCP queries on recreated interfaces.

2019-07-10 Thread Petr Mensik
est Regards, Vladislav Grishenko > > -Original Message- > From: Dnsmasq-discuss On > Behalf Of Petr Mensik > Sent: Tuesday, July 9, 2019 5:31 PM > To: dnsmasq-discuss@lists.thekelleys.org.uk > Subject: [Dnsmasq-discuss] [PATCH] Issues with TCP queries on recreated > i

Re: [Dnsmasq-discuss] [PATCH] Issues with TCP queries on recreated interfaces.

2019-07-11 Thread Petr Mensik
just for some > selected. > At the other hand, with no __attribute__((warn_unused_result)) it will not > generate warning anyway. > > Best Regards, Vladislav Grishenko > > -Original Message- > From: Petr Mensik > Sent: Wednesday, July 10, 2019 3:01 PM >

Re: [Dnsmasq-discuss] [PATCH] Issues with TCP queries on recreated interfaces.

2019-07-15 Thread Petr Mensik
ote it is used more times. If one interface stops listening, do not stop listening yet until all listeners end. Because address includes family, patch 5 removes duplicate family. Made that separate because it kind of cover what is important change. Cheers, Petr On 7/11/19 12:23 PM, Petr Mensik

Re: [Dnsmasq-discuss] Wildcard in interface names

2019-07-29 Thread Petr Mensik
Yes, according to code, wildcard is matched in no-dhcp-interface as well. On 7/25/19 1:33 AM, Art Greenberg wrote: > The man page states that an asterisk (*) can be used as a wildcard with the > --interface and --except-interface options. Does this also apply to > --no-dhcp-interface? > > Thank

Re: [Dnsmasq-discuss] [PATCH] Issues with TCP queries on recreated interfaces.

2019-07-31 Thread Petr Mensik
and, maybe it should print complete address with port as well. Precise information does not hurt, even when port would be a bit repeating. Now it includes also port. These are just debug information after all, no need for them to be shortest possible. > > Best Regards, Vladislav Grishenko > >

Re: [Dnsmasq-discuss] Issue with SO_BINDTODEVICE for dhcp

2019-07-31 Thread Petr Mensik
Hi Martin, I think it would make more sense to not derive intended behaviour from number of interfaces but allow desired behaviour to be specified explicitly. If machines want to reuse the same address multiple times on different interfaces, they may want explicit configuration of BINDTODEVICE en

Re: [Dnsmasq-discuss] Web interface for DNSmasq

2019-08-20 Thread Petr Mensik
Hi Robert, it might be useful to know you use cases. What parts of dnsmasq you need and what parts you do not. For example libvirt has its own machinery to edit hosts in xml file and generate dnsmasq config files. Hosts could be separate files. Leases could also be provided by script. If you need

[Dnsmasq-discuss] [BUG] RA are sent too fast and slows down the machine

2019-08-21 Thread Petr Mensik
Hi Simon and Maarten, we discovered when playing with NetworkManager-ci [1], that lastest release is somehow broken. Test running dnsmasq are quite slow on latest release. I have created repeatable started script that reproduces it. Then used git bisect to find when it was broken. It seems fast s

Re: [Dnsmasq-discuss] is dnsmasq shared by all ports

2019-08-26 Thread Petr Mensik
Hi Gordon, depends on your configuration, which you forgot to provide. What is in /etc/resolv.conf for example? What flags/configuration are both instances using? I would quess 127.0.0.1 might be in resolv.conf. That would mean hosts.2 instance would query hosts.1 instance. That might or might no

Re: [Dnsmasq-discuss] Best way to handle dual-wans with dnsmasq

2019-08-26 Thread Petr Mensik
Hi John, unless you want too much work, I would suggest using separate domain for management names. If you are not afraid management network would be accessible to all users, just use --server=/mgmt.example.net/1.2.3.4 and --server=5.6.7.8 for normal names (or just read /etc/resolv.conf for them).

Re: [Dnsmasq-discuss] [BUG] RA are sent too fast and slows down the machine

2019-08-28 Thread Petr Mensik
/InfrastructureServices/dnsmasq-tests/blob/master/bz1739797.sh On 8/27/19 10:45 AM, Iain Lane wrote: > On Wed, Aug 21, 2019 at 08:59:07PM +0200, Petr Mensik wrote: >> Hi Simon and Maarten, >> >> we discovered when playing with NetworkManager-ci [1], that lastest >> release is somehow broke

Re: [Dnsmasq-discuss] Best way to handle dual-wans with dnsmasq (John Knight)

2019-08-28 Thread Petr Mensik
Hi John, we are using kind of hack for similar purpose in dnssec-trigger package. If udhcpc serves domain or search directives for resolv.conf, they can be used to redirect just those domains to management servers. It can work centrally managed. But requires special handling of search domains, tha

Re: [Dnsmasq-discuss] [BUG] RA are sent too fast and slows down the machine

2019-08-28 Thread Petr Mensik
> Best Regards, Vladislav Grishenko > > -Original Message----- > From: Dnsmasq-discuss On > Behalf Of Petr Mensik > Sent: Wednesday, August 28, 2019 12:11 PM > To: dnsmasq-discuss@lists.thekelleys.org.uk > Subject: Re: [Dnsmasq-discuss] [BUG] RA are sent too fast and

Re: [Dnsmasq-discuss] [BUG] [PATCH] RA are sent too fast and slows down the machine

2019-08-28 Thread Petr Mensik
amped for time so > I can't promise fast results. > > Kinds regards, > > Maarten > > > On 27-08-2019 10:45, Iain Lane wrote: >> On Wed, Aug 21, 2019 at 08:59:07PM +0200, Petr Mensik wrote: >>> Hi Simon and Maarten, >>> >>> we discovere

Re: [Dnsmasq-discuss] [BUG] [PATCH] RA are sent too fast and slows down the machine

2019-09-02 Thread Petr Mensik
d interface, but I can't see how it generates more > "new address events" and therefore a flood of packets. > > > Unless, the originating system receives _its_own_ RA and that generates > a "new address" event? > > Simon. > > > > On 2

Re: [Dnsmasq-discuss] [patch] empty empty lines

2019-09-30 Thread Petr Mensik
Hi John, dnsmasq is quite interesting piece of software. It is used by lot different kind of projects. I think noone objected dnsmasq isn't useful or Simon does not work on it. But as with everything, there is always some space for improvements. There is no reason why Simon should stop working on

Re: [Dnsmasq-discuss] [PATCH v2] Change dhcp_release to use default address when no IP subnet matches

2019-10-01 Thread Petr Mensik
s.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemen...@redhat.com PGP: 65C6C973 >From 8fda4b4620ca2b23152ca805d14c7cde1083fe31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 1

Re: [Dnsmasq-discuss] (PATCH) catch up

2019-10-01 Thread Petr Mensik
Hello Simon, I would like to remind issue with TCP and recreated interfaces. Original thread [1], my GitHub branch [2]. Modified a bit since last time, not sure whether it is better to attach all those patches. Checkout of branch would be easier for me. I would like also non-recursive queries com

Re: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-29 Thread Petr Mensik
Hi Sean, this is not dnsmasq related question, since it is not involved directly. $ hostname -d If that prints something different than (none), you have some domain set as part of hostname on the router. I do not know how to flush DNS cache on Android. But googled it successfully [1]. As lo

Re: [Dnsmasq-discuss] CNAME trouble with no AAAA

2019-10-29 Thread Petr Mensik
Hi Dominick, more below On 10/17/19 3:41 AM, Dominick C. Pastore wrote: Hello, I'm having a bit of a problem with the "cname" option in Dnsmasq. I have some configuration options like these in dnsmasq.conf, where "host1" and "host2" have IPv4 addresses from DHCP: domain=philadelphia.example.