-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Deprecate REPLY_ADDR4/6 in favor of more fine-grained setting #1293
Conversation
Signed-off-by: DL6ER <dl6er@dl6er.de>
…its for deciding if the address is unspecified. Signed-off-by: DL6ER <dl6er@dl6er.de>
… and BLOCK_IPV4/6. If REPLY_ADDR4/6 is set and neither LOCAL_IPV4/6 nor BLOCK_IPV4/6, we use the value for both to preserve current behavior. Signed-off-by: DL6ER <dl6er@dl6er.de>
…o replace the blocking IP address but not the local one and need to determine the latter. Signed-off-by: DL6ER <dl6er@dl6er.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add/modify a test for the new settings?
Co-authored-by: yubiuser <ckoenig@posteo.de> Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Tests added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally tested.
[2022-02-01 20:49:58.946 32148M] LOCAL_IPV4: Using IPv4 address 4.3.2.1 for pi.hole and hostname
[2022-02-01 20:49:58.946 32148M] LOCAL_IPV6: Automatic interface-dependent detection of address
[2022-02-01 20:49:58.946 32148M] BLOCK_IPV4: Using IPv4 address 1.2.3.4 in IP blocking mode
[2022-02-01 20:49:58.946 32148M] BLOCK_IPV6: Automatic interface-dependent detection of address
rockpi@rockpi-4b:~$ dig flurry.com @127.0.0.1 +short
1.2.3.4
rockpi@rockpi-4b:~$ dig pi.hole @127.0.0.1 +short
4.3.2.1
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 |
By submitting this pull request, I confirm the following:
How familiar are you with the codebase?:
10
This PR addresses #1291 by replacing the multi-purpose config setting
REPLY_ADDR4
andREPLY_ADDR6
with more fine-grained settings.This allows for fine-grained setting of the IP to hand out for blocked queries in
IP
blocking mode (usingBLOCK_IPV4/6
) independently of the IP address returned for lookups ofpi.hole
and the device's hostname (LOCAL_IPV4/6
).If neither
BLOCK_IPV4/6
norLOCAL_IPV4/6
is set butREPLY_ADDR4/6
is found, we use its value for both settings to preserve existing behavior.This PR also contains a bug fix ensuring overwriting also works for IPv6 over the loopback device (e5f69e1).