Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update embedded dnsmasq to v2.87test8 #1281

Merged
merged 37 commits into from
Feb 9, 2022
Merged

Update embedded dnsmasq to v2.87test8 #1281

merged 37 commits into from
Feb 9, 2022

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 12, 2022

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Highlights:

  • DNSSEC improvements:
    • When searching for an in-flight DNSSEC query to use (rather than starting a new one), compare the already sent query, 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.
    • 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.
    • 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.
  • Log port numbers in server addresses when non-standard ports in use (Pi-hole contribution)
  • Fix header of cache dump (Pi-hole contribution)
  • Extend cache dump: "!" as type for non-terminals, new flag "C" for config-provided and log source when applicable. (Pi-hole contribution)
  • Log source of ignored query when local-service is used. (Pi-hole contribution)
  • Minimum safe size is recommended to be 1232. (Pi-hole contribution)
  • Extend packet dump system to RA, DHCP and TFTP
  • Handle changing interface indexes when binding DHCP sockets.
  • Add --conf-script to generate dnsmasq config using a script rather than static files

The warning

  • Ignoring query from non-local network
    has been changed to
  • ignoring query from non-local network <ADDRESS>

Daniel Collins and others added 30 commits January 12, 2022 20:54
…tate of the -y/--localise-queries option.

Signed-off-by: DL6ER <dl6er@dl6er.de>
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.

Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
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.

Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…e 30 and 40 characters, respectively.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…nfig-provided and log source when applicable.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Thanks to Dominik Derigs for the initial patch.

Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
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.

Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…se-engineering it ourselves from the sockaddr

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…e the real query type from the arg string

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
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.

Signed-off-by: DL6ER <dl6er@dl6er.de>
…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>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…ations.

RFC 4861 para 4.1 is a MUST.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
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.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Bug introduced in fc664d114d6e11ced4912b746f18d543f662066b

Signed-off-by: DL6ER <dl6er@dl6er.de>
DL6ER and others added 6 commits February 5, 2022 09:53
Signed-off-by: DL6ER <dl6er@dl6er.de>
The circumstances under which actions occur depending on
configuration is now controlled only by newaddress() in network.c

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER marked this pull request as ready for review February 8, 2022 19:31
@DL6ER DL6ER changed the title Update embedded dnsmasq Update embedded dnsmasq to v2.87test8 Feb 8, 2022
Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs documentation change in https://docs.pi-hole.net/ftldns/dnsmasq_warn/

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-v5-8-1-bug/53394/10

@DL6ER DL6ER merged commit 1dbdce0 into development Feb 9, 2022
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-14-web-v5-11-and-core-v5-9-released/53529/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants