Re: [Dnsmasq-discuss] [patch] Option to remove A-forA
On Fri, Jan 26, 2018 at 3:42 PM, Simon Kelley wrote: > On 25/01/18 15:03, Mattias Hellström wrote: > > Hi, > > I have made a patch to disable the A-for-A feature. > > I believe that the text portions can be made better by an actual DNS > expert. > > > > There are no downsides to doing A-for-A, as far as I know. If this > feature is still doing some good, it should be left. If it's obsolete, > it should be entirely removed, that way we gain a small codesize and > support reduction, instead of increasing both. > In that case, removing it completely is the best choice in my opinion. The source of these requests was patched out man many years ago. And any new sources probably want a proper NXDOMAIN in return. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] simplify bindtodevice()
Patch applied. Many thanks. Cheers, Simon. On 21/12/17 04:01, Kurt H Maier wrote: > Right now bindtodevice() declares an ifreq, copies the device name into > it, and passes a pointer to the entire structure as the optval for > setsockopt. This only works because ifr_name happens to be the first > element in the ifreq data structure. What actually gets passed to > setsockopt looks like > "wlp3s0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255nzHmU\0\0"... > and is 40 bytes long. > > We could change it so we pass ifr.ifr_name, but this is wasteful too, > since device is already in the format we want. > > Attached is a patch that uses device directly, and passes IFNAMSIZ as > optlen. > > Thanks, > khm > > > diff --git a/src/dhcp-common.c b/src/dhcp-common.c > index eae9ae3..8e128fa 100644 > --- a/src/dhcp-common.c > +++ b/src/dhcp-common.c > @@ -485,11 +485,8 @@ char *whichdevice(void) > > void bindtodevice(char *device, int fd) > { > - struct ifreq ifr; > - > - strcpy(ifr.ifr_name, device); >/* only allowed by root. */ > - if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)) > == -1 && > + if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, device, IFNAMSIZ) == -1 && >errno != EPERM) > die(_("failed to set SO_BINDTODEVICE on DHCP socket: %s"), NULL, > EC_BADNET); > } > > > ___ > 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] get interface of IP-address / save old leases
Check out the dhcp-script functionality - that should allow you to keep a log that will provide both these bits of information. Cheers, Simon. On 21/12/17 16:06, Manu wrote: > Hi guys, > > I have two questions about dumping leases. > > 1. Is there a chance to get information about which interface (assuming > VLAN networks) the IP address is assigned to? > > 2. Is there a possibility to keep old leases also in the written lease > file - if timestamp of lease validation is in the past? > > Thx in advance for any help! > > Cheers > Manu > > > ___ > 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
Re: [Dnsmasq-discuss] [patch] Option to remove A-forA
On 25/01/18 15:03, Mattias Hellström wrote: > Hi, > I have made a patch to disable the A-for-A feature. > I believe that the text portions can be made better by an actual DNS expert. > > Given the following quote, and if that trend holds true, there are > probably no significant A-for-A requests anymore. > > The percentages of A-for-A seen by root servers reported in 2001, 2003, > and 2008 was 12%–18%, 7.03%, and 2.7%, respectively. The decreasing > trend continues in our data collected in 2012, where A-for-A only > contributes 0.4% of the traffic. > > [[ http://cs.northwestern.edu/~ychen/Papers/DNS_ToN15.pdf ]] > > How likely is it that this new option will ever be used? Can we even provide guidance on when it should be set or not set? My guess is that it will almost never be used, so the extra code for this will occupy memory in millions of devices for no benefit, and it will be some small extra support effort forever. There are no downsides to doing A-for-A, as far as I know. If this feature is still doing some good, it should be left. If it's obsolete, it should be entirely removed, that way we gain a small codesize and support reduction, instead of increasing both. IMHO Cheers, Simon. 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] [patch] Option to remove A-forA
+++ b/man/dnsmasq.8 +.TP +.B --no-afora +Do not treat A-for-A DNS requests special. I.e. do not duck type a FQDN to an IP. +++ b/src/option.c + { LOPT_NO_AFORA, OPT_NO_AFORA, NULL, gettext_noop("Do not treat A-for-A special."), NULL }, >Those text portions?? Yes those, I am not super happy about them, but I know a domain specialist will have the right wording at their fingertips. On Fri, Jan 26, 2018 at 9:38 AM, Geert Stappers wrote: > On Fri, Jan 26, 2018 at 09:03:07AM +0100, Mattias Hellström wrote: > > On Thu, Jan 25, 2018 at 9:31 PM, Geert Stappers wrote: > > > On Thu, Jan 25, 2018 at 04:03:57PM +0100, Mattias Hellström wrote: > > > > Hi, > > > > I have made a patch to disable the A-for-A feature. > > > > I believe that the text portions can be made better by an actual DNS > expert. > > > > > > > > > > FWIW > > > after "unmengle what was mengled by email programm" still patch > errors occure. > > > > > Looks like I invoked a whitespace problem in the copy paste. Here is the > > patch as attachment. > > The relevant parts are equal to the unmengled if I test with "diff -bB" > > > > Yes, that patch applies cleanly. > > I propose this commit message: > > -8<8<---8< > Option to remove A-forA > > Given the following quote, and if that trend holds true, there are probably > no significant A-for-A requests anymore. > > The percentages of A-for-A seen by root servers reported in 2001, 2003, and > 2008 was 12%, 7.03%, and 2.7%, respectively. The decreasing trend > continues in our data collected in 2012, where A-for-A only contributes > 0.4% of the traffic. > > [[ http://cs.northwestern.edu/~ychen/Papers/DNS_ToN15.pdf ]] > > Signed-of-by: Mattias Hellstrom > -8<8<---8< > > > > > I have made a patch to disable the A-for-A feature. > > > > I believe that the text portions can be made better by an actual DNS > expert. > > +++ b/man/dnsmasq.8 > +.TP > +.B --no-afora > +Do not treat A-for-A DNS requests special. I.e. do not duck type a FQDN > to an IP. > +++ b/src/option.c > + { LOPT_NO_AFORA, OPT_NO_AFORA, NULL, gettext_noop("Do not treat A-for-A > special."), NULL }, > > > Those text portions?? > > > > Groeten > Geert Stappers > -- > 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 mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [patch] Option to remove A-forA
On Fri, Jan 26, 2018 at 09:03:07AM +0100, Mattias Hellström wrote: > On Thu, Jan 25, 2018 at 9:31 PM, Geert Stappers wrote: > > On Thu, Jan 25, 2018 at 04:03:57PM +0100, Mattias Hellström wrote: > > > Hi, > > > I have made a patch to disable the A-for-A feature. > > > I believe that the text portions can be made better by an actual DNS > > > expert. > > > > > > > FWIW > > after "unmengle what was mengled by email programm" still patch errors > > occure. > > > Looks like I invoked a whitespace problem in the copy paste. Here is the > patch as attachment. > The relevant parts are equal to the unmengled if I test with "diff -bB" > Yes, that patch applies cleanly. I propose this commit message: -8<8<---8< Option to remove A-forA Given the following quote, and if that trend holds true, there are probably no significant A-for-A requests anymore. The percentages of A-for-A seen by root servers reported in 2001, 2003, and 2008 was 12%, 7.03%, and 2.7%, respectively. The decreasing trend continues in our data collected in 2012, where A-for-A only contributes 0.4% of the traffic. [[ http://cs.northwestern.edu/~ychen/Papers/DNS_ToN15.pdf ]] Signed-of-by: Mattias Hellstrom -8<8<---8< > > > I have made a patch to disable the A-for-A feature. > > > I believe that the text portions can be made better by an actual DNS > > > expert. +++ b/man/dnsmasq.8 +.TP +.B --no-afora +Do not treat A-for-A DNS requests special. I.e. do not duck type a FQDN to an IP. +++ b/src/option.c + { LOPT_NO_AFORA, OPT_NO_AFORA, NULL, gettext_noop("Do not treat A-for-A special."), NULL }, Those text portions?? Groeten Geert Stappers -- Leven en laten leven ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [patch] Option to remove A-forA
Looks like I invoked a whitespace problem in the copy paste. Here is the patch as attachment. The relevant parts are equal to the unmengled if I test with "diff -bB" On Thu, Jan 25, 2018 at 9:31 PM, Geert Stappers wrote: > On Thu, Jan 25, 2018 at 04:03:57PM +0100, Mattias Hellström wrote: > > Hi, > > I have made a patch to disable the A-for-A feature. > > I believe that the text portions can be made better by an actual DNS > expert. > > > > Given the following quote, and if that trend holds true, there are > probably > > no significant A-for-A requests anymore. > > > > The percentages of A-for-A seen by root servers reported in 2001, 2003, > and > > 2008 was 12%???18%, 7.03%, and 2.7%, respectively. The decreasing trend > } 2008 was 12%, 7.03%, and 2.7%, respectively. The decreasing trend > > continues in our data collected in 2012, where A-for-A only contributes > > 0.4% of the traffic. > > > > [[ http://cs.northwestern.edu/~ychen/Papers/DNS_ToN15.pdf ]] > > > > > > --- > > > > man/dnsmasq.8 | 3 +++ > > > > src/dnsmasq.h | 3 ++- > > > > src/option.c | 3 +++ > > > > src/rfc1035.c | 2 +- > > > > 4 files changed, 9 insertions(+), 2 deletions(-) > > > > > > diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 > > > > index 6b914ec..40d531c 100644 > > > > --- a/man/dnsmasq.8 > > > > +++ b/man/dnsmasq.8 > > > > FWIW > after "unmengle what was mengled by email programm" still patch errors > occure. > > > Find attached the unmengled patch, it will yield this > > patching file man/dnsmasq.8 > Hunk #1 succeeded at 1908 with fuzz 1. > patching file src/dnsmasq.h > Hunk #1 FAILED at 250. > 1 out of 1 hunk FAILED -- saving rejects to file src/dnsmasq.h.rej > patching file src/option.c > Hunk #1 FAILED at 160. > Hunk #3 succeeded at 498 with fuzz 2. > 1 out of 3 hunks FAILED -- saving rejects to file src/option.c.rej > patching file src/rfc1035.c > Hunk #1 FAILED at 1570. > 1 out of 1 hunk FAILED -- saving rejects to file src/rfc1035.c.rej > > > against git HEAD > > > > Groeten > Geert Stappers > -- > Leven en laten leven > dnsmasq.afora.patch Description: Binary data ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss