Simon Kelley
4732aa663b
Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasq
2022-02-24 23:21:55 +00:00
Simon Kelley
c27cfeaa7b
Fix memory leak when DBUS connection fails.
2022-02-24 23:18:54 +00:00
Simon Kelley
bb6f6bae0b
Fix longjump() compiler warnings.
2022-02-24 23:16:04 +00:00
Simon Kelley
f4c87b504b
Fix missing reverse-records from --dynamic-host.
...
Thanks to Sten Spans for spotting the bug.
2022-02-18 20:53:56 +00:00
Simon Kelley
e426c2d3bc
Add --conf-script
2022-02-08 12:10:27 +00:00
Simon Kelley
6279d9eaf3
Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasq
2022-02-04 22:28:53 +00:00
Simon Kelley
12949aa0c0
Ask netlink for new address events unconditionally.
...
The circumstances under which actions occur depending on
configuration is now controlled only by newaddress() in network.c
2022-02-04 22:24:00 +00:00
Simon Kelley
84f3357dd9
Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasq
2022-02-04 21:00:16 +00:00
Johnny S. Lee via Dnsmasq-discuss
4333d5d93a
Fix FTBFS on BSD platforms.
...
Bug introduced in fc664d114d
2022-02-03 23:42:00 +00:00
Simon Kelley
fa580ad3eb
Handle changing interface indexes when binding DHCP sockets.
2022-02-03 17:26:28 +00:00
Simon Kelley
292dfa653e
Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasq
2022-02-02 18:31:22 +00:00
Simon Kelley
7fbf1cce7b
Improve the performance of DHCP relay.
...
On machines with many interfaces, enumerating them
via netlink on each packet reciept is slow,
and unneccesary. All we need is the local address->interface
mapping, which can be cached in the relay structures.
2022-02-02 18:28:27 +00:00
Simon Kelley
dbceeb4178
Dump.c Fix IPv6 checksum on big-endian.
2022-01-30 00:42:46 +00:00
Simon Kelley
ed200fa001
Handle options other than source link-layer address in router solicitations.
...
RFC 4861 para 4.1 is a MUST.
2022-01-29 23:22:52 +00:00
Simon Kelley
b5dafc0b7e
Extend packet dump system to RA.
2022-01-29 22:52:21 +00:00
Simon Kelley
fc664d114d
Extend packet-dump system to DHCP and TFTP.
2022-01-29 15:55:04 +00:00
Simon Kelley
c6d4c33d61
Bump copyright to 2022.
2022-01-24 15:19:00 +00:00
Simon Kelley
bf1fc6c6fd
Tidy iface_check().
2022-01-21 15:47:09 +00:00
Olaf Hering
b18e9c8c61
fix dnsmasq typo in man page
...
Fixes commit 27ce754b3d
Signed-off-by: Olaf Hering <olaf@aepfle.de >
2022-01-21 12:18:08 +00:00
Simon Kelley
a3293bb242
Fix indentation in Umbrella option code.
2022-01-21 12:07:42 +00:00
Simon Kelley
4e2a4b8788
Fix crash in PXE code with bad config.
2022-01-18 00:55:13 +00:00
Simon Kelley
2362784bc0
Debian bug management.
2022-01-18 00:32:15 +00:00
Simon Kelley
b2cec1b881
Debian: fold in 2.86-1.1 changelog and close bug introducded by same.
2022-01-18 00:02:32 +00:00
Simon Kelley
a946857133
Remove temporary debugging message and close related Debian bug.
2022-01-17 23:54:58 +00:00
Simon Kelley
10cd342f5c
Document change of behaviour of --address in 2.86 onwards.
2022-01-17 16:01:02 +00:00
Simon Kelley
27ce754b3d
Tidy previous commit and add manpage entries for new options.
2022-01-15 17:57:57 +00:00
Dominik Derigs
3ab0ad8748
Strip EDNS(0) Client Subnet / MAC information if --strip-subnet or --strip-mac is set. If both the add and strip options are set, incoming EDNS0 options are replaced. This ensures we do not unintentionally forward client information somewhere upstream when ECS is used in lower DNS layers in our local network.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-01-15 15:36:28 +00:00
Dominik Derigs
4308236262
Minimum safe size is recommended to be 1232. See https://dnsflagday.net/2020/
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-01-13 00:31:54 +00:00
Simon Kelley
ebd8350300
Fix DNSSEC failure to validate unsigned NoDATA replies.
...
A reply with an empty answer section would not always be checked
for either suitable NSEC records or proof of non-existence of
the relevant DS record.
2022-01-13 00:12:07 +00:00
Simon Kelley
8285d335f4
Fix error introduced in 11c52d032b
2022-01-12 23:05:25 +00:00
Simon Kelley
9db275ebea
Small fix to ff43d35aee
2022-01-12 23:00:16 +00:00
Petr Menšík
1f8f78a49b
Add root group writeable flag to log file
...
Some systems strips even root process capability of writing to different
users file. That include systemd under Fedora. When
log-facility=/var/log/dnsmasq.log is used, log file with mode 0640
is created. But restart then fails, because such log file can be used
only when created new. Existing file cannot be opened by root when
starting, causing fatal error. Avoid that by adding root group writeable flag.
Ensure group is always root when granting write access. If it is
anything else, administrator has to configure correct rights.
2022-01-11 23:43:09 +00:00
Simon Kelley
c2f129ba3d
Fix FTBFS when HAVE_DNSSEC not defined.
2022-01-11 22:48:14 +00:00
Simon Kelley
07c47416a9
Log source of ignored query when local-service is used.
...
Thanks to Dominik Derigs for the initial patch.
2022-01-11 22:36:01 +00:00
Dominik Derigs
8f2a62b386
Extend cache dump: "!" as type for non-terminals, new flag "C" for config-provided and log source when applicable.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-01-11 22:17:14 +00:00
Dominik Derigs
a6c0edd4f4
Fix header of cache dump. The width of the host and address fields are 30 and 40 characters, respectively.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-01-11 22:16:48 +00:00
Simon Kelley
ff43d35aee
Log port numbers in server addresses when non-standard ports in use.
2022-01-11 22:09:09 +00:00
Simon Kelley
70fca205be
Overhaul code which sends DNSSEC queries.
...
There are two functional changes in this commit.
1) When searching for an in-flight DNSSEC query to use
(rather than starting a new one), compare the already
sent query (stored in the frec "stash" field, rather than
using the hash of the query. This is probably faster (no hash
calculation) and eliminates having to worry about the
consequences of a hash collision.
2) Check for dependency loops in DNSSEC validation,
say validating A requires DS B and validating DS B
requires DNSKEY C and validating DNSKEY C requires DS B.
This should never happen in correctly signed records, but it's
likely the case that sufficiently broken ones can cause
our validation code requests to exhibit cycles.
The result is that the ->blocking_query list
can form a cycle, and under certain circumstances that can lock us in
an infinite loop.
Instead we transform the situation into an ABANDONED state.
2022-01-11 00:29:36 +00:00
Simon Kelley
1033130b6c
Handle malformed query packets sensibly.
...
Previously, hash_questions() would return a random hash
if the packet was malformed, and probably the hash of a previous
query. Now handle this as an error.
2022-01-09 23:21:55 +00:00
Andreas Metzler
8cfcd9ff63
Clarify man page for --filterwin2k
2022-01-06 23:12:53 +00:00
Daniel Collins
80a6c16dcc
Implements a SetLocaliseQueriesOption D-Bus method.
...
For setting the state of the -y/--localise-queries option.
2022-01-06 00:23:53 +00:00
Simon Kelley
553c4c99cc
Fix massive confusion on server reload.
...
The 2.86 upstream server rewrite severely broke re-reading
of server configuration. It would get everyting right the first
time, but on re-reading /etc/resolv.conf or --servers-file
or setting things with DBUS, the results were just wrong.
This should put things right again.
2022-01-03 23:32:30 +00:00
Simon Kelley
4165c1331b
Fix fail to build when NO_SCRIPT set.
2022-01-03 23:31:15 +00:00
Fabrice Fontaine
b2690415bf
src/option.c: fix build with gcc 4.8
...
Thanks for applying and fixing my patch. Here is another one on src/pattern.c
Best Regards,
Fabrice
Le dim. 2 janv. 2022 à 00:36, Simon Kelley <simon@thekelleys.org.uk > a écrit :
>
>
>
> Thanks,
>
>
> patch applied. Followed by a small fix, and then a larger fix when I was
> forced to look at the code in question ;)
>
>
>
> Cheers,
>
> Simon.
>
> On 31/12/2021 16:29, Fabrice Fontaine wrote:
> > Fix the following build failure with gcc 4.8 raised since version 2.86:
> >
> > option.c: In function 'one_opt':
> > option.c:2445:11: error: 'for' loop initial declarations are only allowed in C99 mode
> > for (char *p = arg; *p; p++) {
> > ^
> > option.c:2445:11: note: use option -std=c99 or -std=gnu99 to compile your code
> > option.c:2453:11: error: 'for' loop initial declarations are only allowed in C99 mode
> > for (u8 i = 0; i < sizeof(daemon->umbrella_device); i++, arg+=2) {
> > ^
> >
> > Fixes:
> > - http://autobuild.buildroot.org/results/39b34a4e69fc10f4bd9d4ddb0ed8c0aae5741c84
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com >
> > ---
> > src/option.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/option.c b/src/option.c
> > index ff54def..c57f6d8 100644
> > --- a/src/option.c
> > +++ b/src/option.c
> > @@ -2525,7 +2525,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
> > arg += 9;
> > if (strlen(arg) != 16)
> > ret_err(gen_err);
> > - for (char *p = arg; *p; p++) {
> > + char *p;
> > + for (*p = arg; *p; p++) {
> > if (!isxdigit((int)*p))
> > ret_err(gen_err);
> > }
> > @@ -2533,7 +2534,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
> >
> > u8 *u = daemon->umbrella_device;
> > char word[3];
> > - for (u8 i = 0; i < sizeof(daemon->umbrella_device); i++, arg+=2) {
> > + u8 i;
> > + for (i = 0; i < sizeof(daemon->umbrella_device); i++, arg+=2) {
> > memcpy(word, &(arg[0]), 2);
> > *u++ = strtoul(word, NULL, 16);
> > }
> >
>
From 0c89dd2fa0fe50b00bca638dbbacfbd361526e0a Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com >
Date: Sun, 2 Jan 2022 21:57:52 +0100
Subject: [PATCH] src/pattern.c: fix build with gcc 4.8
Fix the following build failure:
pattern.c: In function 'is_valid_dns_name':
pattern.c:134:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (const char *c = value;; c++)
^
pattern.c:134:3: note: use option -std=c99 or -std=gnu99 to compile your code
pattern.c: In function 'is_valid_dns_name_pattern':
pattern.c:249:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (const char *c = value;; c++)
^
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com >
2022-01-03 15:13:53 +00:00
Simon Kelley
011f8cf1d0
Tidy code for --umbrella option.
2022-01-01 23:33:39 +00:00
Simon Kelley
2748fb81e2
Fix 46312909d9 typo.
2022-01-01 23:03:26 +00:00
Fabrice Fontaine
46312909d9
src/option.c: fix build with gcc 4.8
...
Fix the following build failure with gcc 4.8 raised since version 2.86:
option.c: In function 'one_opt':
option.c:2445:11: error: 'for' loop initial declarations are only allowed in C99 mode
for (char *p = arg; *p; p++) {
^
option.c:2445:11: note: use option -std=c99 or -std=gnu99 to compile your code
option.c:2453:11: error: 'for' loop initial declarations are only allowed in C99 mode
for (u8 i = 0; i < sizeof(daemon->umbrella_device); i++, arg+=2) {
^
Fixes:
- http://autobuild.buildroot.org/results/39b34a4e69fc10f4bd9d4ddb0ed8c0aae5741c84
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com >
2022-01-01 23:00:25 +00:00
Simon Kelley
41adecad14
Include client address if TFTP file-not-found errors.
2022-01-01 22:15:16 +00:00
Simon Kelley
ea5d8c56a0
Finesse parsing of --dhcp-remoteid and --dhcp-subscrid.
...
To be treated as hex, the pattern must consist of only hex digits AND
contain at least one ':'. Thanks to Bengt-Erik Sandstrom who tripped
over a pattern consisting of a decimal number which was interpreted
surprisingly.
2021-12-30 23:22:43 +00:00
Simon Kelley
d242cbffa4
Add snooping of DHCPv6 prefix delegation to the DHCP-relay function.
2021-12-30 21:20:37 +00:00