<div dir="ltr"><div>Hi </div><div><br>Apologies for not elaborating it further, so I wanted to know why we are seeing different behavior what is expected, I was wondering if there is some additional configuration which I am missing. Expected Behavior which I think is even though one of the upstream server is down, dnsmasq should get the results from other two upstream servers</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 28, 2020 at 11:54 AM <<a href="mailto:dnsmasq-discuss-request@lists.thekelleys.org.uk">dnsmasq-discuss-request@lists.thekelleys.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Dnsmasq-discuss mailing list submissions to<br>
        <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:dnsmasq-discuss-request@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss-request@lists.thekelleys.org.uk</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:dnsmasq-discuss-owner@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss-owner@lists.thekelleys.org.uk</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Dnsmasq-discuss digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: : Dns lookup failures if one of the upstream servers are<br>
      down (P Elaborate)<br>
   2. Re: SOA serial increase (Simon Kelley)<br>
   3. Re: Nameserver dot (Simon Kelley)<br>
   4. Re: Fwd: dnsmasq localise-queries + addn-hosts (Simon Kelley)<br>
   5. Re: NETLINK_NO_ENOBUFS not defined on old platforms (Simon Kelley)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 28 Mar 2020 12:54:11 +0100<br>
From: P Elaborate <<a href="mailto:stappers@stappers.nl" target="_blank">stappers@stappers.nl</a>><br>
To: <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
Subject: Re: [Dnsmasq-discuss] : Dns lookup failures if one of the<br>
        upstream servers are down<br>
Message-ID: <<a href="mailto:20200328115411.3sxomstt7iqmn66j@gpm.stappers.nl" target="_blank">20200328115411.3sxomstt7iqmn66j@gpm.stappers.nl</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Thu, Mar 26, 2020 at 07:39:21AM -0700, Abhishek Patti wrote:<br>
> Hi Everyone<br>
> <br>
> We are using dnsmasq version 2.80 and have multiple upstream servers<br>
> configured, with all-servers flag set. We noticed that if first upstream<br>
> server fails then we get dns lookup failures even though other upstream<br>
> servers are working fine.<br>
<br>
<br>
Please elaborate<br>
<br>
<br>
Long version:<br>
The "it doesn't work as expected" has been seen.<br>
What not yet has been seen in which way that report<br>
can improve dnsmasq.<br>
<br>
Most likely is <a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="noreferrer" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
the way to go.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sat, 28 Mar 2020 17:01:25 +0000<br>
From: Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>><br>
To: <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
Subject: Re: [Dnsmasq-discuss] SOA serial increase<br>
Message-ID: <<a href="mailto:e28912b8-5a4c-b54c-bce0-0150001b537f@thekelleys.org.uk" target="_blank">e28912b8-5a4c-b54c-bce0-0150001b537f@thekelleys.org.uk</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
On 20/03/2020 11:15, William Edwards wrote:<br>
> Hi Simon!<br>
>> If you don't explicitly set the serial, then it should start at the<br>
>> current epoch ?time (ie seconds since 1/1/1970) which avoids the problem<br>
>> unless you average more than one new DHCP lease per second.<br>
> After setting 'auth-server', this behaviour has been 'fixed'.<br>
> Without 'auth-server':<br>
> --<br>
> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN ? ?SOA ? ?. . 1 1200 180 1209600 600<br>
> --<br>
> With 'auth-server':<br>
> --<br>
> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN ? ?SOA ? ?<a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. <a href="http://hostmaster.vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">hostmaster.vlan5.hosts.cyberfusion.space</a>. 1584702843 1200 180 1209600 600<br>
> --<br>
> So this seems like a combination of 1) possibly some room for improvement in docs (there is little mention of serials there at all) and 2) working too late at night.<br>
> William<br>
<br>
<br>
The forthcoming 2.81 release errors in startup is auth-server is not set<br>
under these circumstances.<br>
<br>
<a href="http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=08933475abd0580cff747e3d1e0db3865207a200" rel="noreferrer" target="_blank">http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=08933475abd0580cff747e3d1e0db3865207a200</a><br>
<br>
<br>
Cheers,<br>
<br>
Simon.<br>
<br>
> <br>
> On 20/03/2020 08:18, William Edwards wrote:<br>
>><br>
>> Op 20 mrt. 2020 om 00:39 heeft Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a><br>
>> <mailto:<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>>> het volgende geschreven:<br>
>><br>
>>> On 19/03/2020 17:28, William Edwards wrote:<br>
>>>> Hello,<br>
>>>><br>
>>>> Does dnsmasq increase SOA serial when adding a new DNS record after DHCP<br>
>>>> lease is requested?<br>
>>><br>
>>> Yes.<br>
>>><br>
>>>><br>
>>>> I am not sure because docs say '--auth-soa' allows for specifying serial.<br>
>>><br>
>>> It does, but it's optional: dnsmasq will generate one for you. If you do<br>
>>> specify a serial, it will still get incremented after a new DHCP lease<br>
>>> is created.<br>
>><br>
>> Thanks.<br>
>><br>
>> I noticed that serial is reset back to 1 when dnsmasq is restarted. This<br>
>> would cause the serial to be lower on dnsmasq than its slaves after a<br>
>> restart, even when DHCP leases are handed out and DNS records are added.<br>
>><br>
>> Is this intentional behaviour?<br>
>><br>
>>><br>
>>><br>
>>> Cheers,<br>
>>><br>
>>> Simon.<br>
>>><br>
>>>><br>
>>>> Met vriendelijke groeten,<br>
>>>><br>
>>>> William Edwards<br>
>>>> T. 040 - 711 44 96<br>
>>>> E. <a href="mailto:wedwards@cyberfusion.nl" target="_blank">wedwards@cyberfusion.nl</a> <mailto:<a href="mailto:wedwards@cyberfusion.nl" target="_blank">wedwards@cyberfusion.nl</a>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Dnsmasq-discuss mailing list<br>
>>>> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
>>>> <mailto:<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a>><br>
>>>> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
>>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Dnsmasq-discuss mailing list<br>
>>> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
>>> <mailto:<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a>><br>
>>> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
>><br>
>> _______________________________________________<br>
>> Dnsmasq-discuss mailing list<br>
>> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
>> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
>><br>
> <br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
> <br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sat, 28 Mar 2020 17:55:55 +0000<br>
From: Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>><br>
To: <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
Subject: Re: [Dnsmasq-discuss] Nameserver dot<br>
Message-ID: <<a href="mailto:b55f2c65-66d5-94ef-40a2-6c323a9d6ecf@thekelleys.org.uk" target="_blank">b55f2c65-66d5-94ef-40a2-6c323a9d6ecf@thekelleys.org.uk</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
On 20/03/2020 14:29, William Edwards wrote:<br>
>> This sounds like a bug, doing auth DNS without an auth-server statement<br>
>> is a recent addition, and I probably forgot this effect on secondary<br>
>> servers. Will take a look in the next day or two.<br>
> <br>
> No worries. What's important to me is that only entries in 'auth-sec-servers' are returned as NS records, being my public DNS servers.<br>
> Thanks,<br>
> William<br>
<br>
I just pushed<br>
<br>
<a href="http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=b43585c34baf0c5eb478aa07423da534b2118536" rel="noreferrer" target="_blank">http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=b43585c34baf0c5eb478aa07423da534b2118536</a><br>
<br>
which addresses this.<br>
<br>
If --auth-server is a complete configuration<br>
<br>
auth-server=<a href="http://dnsmasq.example.com" rel="noreferrer" target="_blank">dnsmasq.example.com</a>,eth0<br>
<br>
then <a href="http://dnsmasq.example.com" rel="noreferrer" target="_blank">dnsmasq.example.com</a> will appear in the NS RRset and dnsmasq will<br>
act as a nameserver for the domain on queries via eth0<br>
<br>
IF instead, there's no interface or address specification, then the<br>
domain will NO LONGER appear in the NS RRset, only the entries in<br>
auth-sec-servers will. Under these circumstances, the only use made of<br>
the domain in auth-server is to fill in the MNAME field in the SOA RR,<br>
so it makes most sense for it to be the name of whichever of the<br>
auth-sec-servers is acting as "primary".<br>
<br>
That seems to make sense.<br>
<br>
As a workaround, with 2.80, just pick which of your servers is primary<br>
and remove it from the --auth-sec-servers list and add it as<br>
--auth-server. Remember to undo that when you upgrade to 2.81<br>
<br>
<br>
Cheers,<br>
<br>
Simon.<br>
<br>
<br>
<br>
<br>
<br>
> <br>
> <br>
> On 20/03/2020 08:25, William Edwards wrote:<br>
>><br>
>>> Op 20 mrt. 2020 om 00:23 heeft Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>> het volgende geschreven:<br>
>>><br>
>>>> On 19/03/2020 17:23, William Edwards wrote:<br>
>>>> Hi,<br>
>>>><br>
>>>> I have auth-sec-servers set to:<br>
>>>> 'auth-sec-servers=<a href="http://nsauth0.cyberfusion.nl" rel="noreferrer" target="_blank">nsauth0.cyberfusion.nl</a>,<a href="http://nsauth1.cyberfusion.be" rel="noreferrer" target="_blank">nsauth1.cyberfusion.be</a>,<a href="http://nsauth2.cyberfusion.nu" rel="noreferrer" target="_blank">nsauth2.cyberfusion.nu</a>,<a href="http://nsauth3.cyberfusion.nl" rel="noreferrer" target="_blank">nsauth3.cyberfusion.nl</a>'<br>
>>>><br>
>>>> These nameservers are shown, but I am also getting back an NS record<br>
>>>> consisting of '.':<br>
>>>><br>
>>>> ---<br>
>>>> ;; ANSWER SECTION:<br>
>>>> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN NS <a href="http://nsauth1.cyberfusion.be" rel="noreferrer" target="_blank">nsauth1.cyberfusion.be</a>.<br>
>>>> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN NS .<br>
>>>> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN NS <a href="http://nsauth0.cyberfusion.nl" rel="noreferrer" target="_blank">nsauth0.cyberfusion.nl</a>.<br>
>>>> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN NS <a href="http://nsauth2.cyberfusion.nu" rel="noreferrer" target="_blank">nsauth2.cyberfusion.nu</a>.<br>
>>>> <a href="http://vlan5.hosts.cyberfusion.space" rel="noreferrer" target="_blank">vlan5.hosts.cyberfusion.space</a>. 600 IN    NS    <a href="http://nsauth3.cyberfusion.nl" rel="noreferrer" target="_blank">nsauth3.cyberfusion.nl</a>.<br>
>>>> --<br>
>>>><br>
>>>> Where does 'NS .' come from?<br>
>>><br>
>>> The --auth-server configuration, probably.  What does that look like?<br>
>><br>
>> I did not specify an ?auth-server? directive. I did so, and now, the first NS record indeed is no longer a dot.<br>
>><br>
>> This brings me to the next question: how do I prevent dnsmasq from even showing itself in NS records? dnsmasq will not answer queries to the internet.<br>
>><br>
>>><br>
>>><br>
>>> Simon.<br>
>>><br>
>>><br>
>>>><br>
>>>> Met vriendelijke groeten,<br>
>>>><br>
>>>> William Edwards<br>
>>>> T. 040 - 711 44 96<br>
>>>> E. <a href="mailto:wedwards@cyberfusion.nl" target="_blank">wedwards@cyberfusion.nl</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>>  <br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Dnsmasq-discuss mailing list<br>
>>>> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
>>>> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
>>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Dnsmasq-discuss mailing list<br>
>>> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
>>> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
>> _______________________________________________<br>
>> Dnsmasq-discuss mailing list<br>
>> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
>> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
>><br>
> <br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
> <br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Sat, 28 Mar 2020 17:59:21 +0000<br>
From: Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>><br>
To: <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
Subject: Re: [Dnsmasq-discuss] Fwd: dnsmasq localise-queries +<br>
        addn-hosts<br>
Message-ID: <<a href="mailto:9bc61a6f-fce2-f97a-c6d5-6d711208c307@thekelleys.org.uk" target="_blank">9bc61a6f-fce2-f97a-c6d5-6d711208c307@thekelleys.org.uk</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
On 19/03/2020 21:47, Jake Howard wrote:<br>
> Hello!<br>
> <br>
> Is `localise-queries` meant to work against entries added via?<br>
> `addn-hosts`? Querying a record returns both IPs, but always in the same?<br>
> order. The order is correctly fixed when the records are put in?<br>
> `/etc/hosts` directly.<br>
<br>
<br>
Yes, localise-queries  works with entries added via addn-hosts, but it<br>
doesn't have anything to do with the order that records appear, so that<br>
doesn't address your problem. What are you trying to achieve?<br>
<br>
<br>
Simon.<br>
<br>
<br>
> <br>
> Config:<br>
> <br>
> ```<br>
> localise-queries<br>
> no-resolv<br>
> cache-size=10000<br>
> log-queries<br>
> log-facility=/var/log/pihole.log<br>
> local-ttl=2<br>
> log-async<br>
> server=8.8.8.8<br>
> server=8.8.4.4<br>
> server=1.1.1.1<br>
> server=1.0.0.1<br>
> interface=eth0<br>
> server=/<a href="http://use-application-dns.net/" rel="noreferrer" target="_blank">use-application-dns.net/</a><br>
> <br>
> addn-hosts=/etc/vpn-hosts.conf<br>
> localise-queries<br>
> <br>
> ```<br>
> <br>
> This is from pihole, but AFAIK that shouldn't make a difference if I'm?<br>
> modifying the config directly.<br>
> <br>
> Would appreciate some input, or being told i'm wrong!<br>
> <br>
> Thanks,<br>
> <br>
> - Jake Howard<br>
> <br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
> <br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Sat, 28 Mar 2020 18:13:15 +0000<br>
From: Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>><br>
To: Roy Marples <<a href="mailto:roy@marples.name" target="_blank">roy@marples.name</a>>,<br>
        <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
Subject: Re: [Dnsmasq-discuss] NETLINK_NO_ENOBUFS not defined on old<br>
        platforms<br>
Message-ID: <<a href="mailto:69804be5-cd9e-9d62-3baf-6f2482eba1f1@thekelleys.org.uk" target="_blank">69804be5-cd9e-9d62-3baf-6f2482eba1f1@thekelleys.org.uk</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
On 20/03/2020 02:18, Roy Marples wrote:<br>
> On 19/03/2020 22:01, Simon Kelley wrote:<br>
>> <a href="http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0506a5ed4e56863627c54aedad30ad61221292ef" rel="noreferrer" target="_blank">http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0506a5ed4e56863627c54aedad30ad61221292ef</a><br>
>><br>
>><br>
>><br>
>> should handle both old kernel header files and old kernels, in any<br>
>> combination.<br>
> <br>
> I really dislike this approach because it makes the assumption that no<br>
> other symbol will take No 5.<br>
<br>
Linux is pretty hot on ABI backwards compatibilty, so I doubt that there<br>
has been any other netlink sockopt with number 5 in the past, or if that<br>
sockopt disappears in the future any other opt would re-use it. Anyone<br>
adding sockopts to a private kernel and picks the next free number,<br>
rather than one at the end of the range or a defined private space needs<br>
their bumps felt: it's obvious that it's going to clash with the<br>
mainline kernel. I could #ifdef all the code if NETLINK_NO_ENOBUFS isn't<br>
defined, and that would only lose us the ability to build against old<br>
headers and still get the fix on a new enough kernel. It's probably not<br>
a big loss, but it addresses a problem that seems unlikely.<br>
<br>
Note that the code checks the kernel version, so if you build on old<br>
headers and run on an old kernel, then despite the code assuming sockopt<br>
5, it won't call setsockopt(5) when running on the old kernel.<br>
<br>
<br>
This code is Linux-only, so what BSD does doesn't count.<br>
<br>
Simon.<br>
<br>
<br>
> <br>
> Whilst this might be true for generic linux, is it true for customised<br>
> linux?<br>
> Or to put it another way I can point to many examples cross BSD where<br>
> the ioctls differ in number but not name.<br>
> <br>
> You might take the view "So what? We just support generic linux.".<br>
> <br>
> I have started to take the hard stance with Arch Linux which shipped<br>
> latest kernel headers and support that on an old LTS kernel. It's not<br>
> maintainable because I've had 3 instances where dhcpcd used to do this<br>
> and then promptly crashed on newer kernels because they had customised<br>
> headers.<br>
> <br>
> Modern software should not need this hack. Either #ifdef around it or<br>
> require userland headers to define it. Don't hardcode it as it's not<br>
> userlands responsibility to do it.<br>
> <br>
> See the similar case where OpenBSD removed a ioctl but let it in the<br>
> header - even worse!!<br>
> <br>
> Roy<br>
> <br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Dnsmasq-discuss Digest, Vol 178, Issue 32<br>
************************************************<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">abhishek </div></div>