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

Regex Extension "reply=" truncates ipv6 addresses to 16 characters #2013

Closed
mtezzo opened this issue Jul 16, 2024 · 1 comment
Closed

Regex Extension "reply=" truncates ipv6 addresses to 16 characters #2013

mtezzo opened this issue Jul 16, 2024 · 1 comment

Comments

@mtezzo
Copy link

mtezzo commented Jul 16, 2024

Versions

  • Pi-hole: v5.18.3
  • AdminLTE: v5.21
  • FTL: v5.25.2

Platform

  • OS and version: Ubuntu 22.04.4 LTS
  • Platform: Dell Optiplex

Expected behavior

A request for a AAAA record for a blacklisted domain with a reply= should be answered with the IPv6 Address specified in the reply=

Example:

^example.com$;reply=192.168.1.9;reply=fd17:1234:1234:1234:1234:1234:1234:1234

dig AAAA example.com should return fd17:1234:1234:1234:1234:1234:1234:1234

Actual behavior / bug

Using the example above:

dig AAAA example.com returns ::

In the Pi-Hole Diagnosis, the following error is then reported:

Error message:
Unknown reply type "fd17:1234:1234:1"

The IPv6 address appears to be truncated to 16 characters and results in a failure. This appears to be due to line 244 in FTL/src/regex.c:

// options ";reply=NXDOMAIN", etc.
else if(sscanf(part, "reply=%16s", extra))
{

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to 'Domains'
  2. Add a Regex Filter as a Blacklist Item such as (be sure the IPv6 is >16 characters):
    ^example.com$;reply=192.168.1.9;reply=fd17:1234:1234:1234:1234:1234:1234:1234
  3. From another machine, run:
    dig AAAA example.com
  4. Go to Tools->Pi-Hole Diagnosis and see error.

Debug Token

Screenshots

Screenshot 2024-07-16 at 12 26 44 PM

Additional context

Add any other context about the problem here.

@DL6ER
Copy link
Member

DL6ER commented Jul 16, 2024

Thanks for your report. This particular bug has been fixed more than one year ago in the public Pi-hole v6.0 beta via 9483ed6. Neither the beta nor the released version of Pi-hole v6.0 will be affected by this any longer.

I will close this issue ticket as there are not plans to release a further v5.x version but enter the release cycle for v6.0 soon(ish).

@DL6ER DL6ER closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants