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

make nameserver value of /etc/resolv.conf configurable #53

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

lanefu
Copy link
Contributor

@lanefu lanefu commented Sep 6, 2023

add backwards-compatible defaults value to override contents of /etc/resolv.conf nameserver for those needing a workaround.

Description

programs like dig and nslookup parse /etc/resolv.conf directly and do not support the port attribute of nameserver host:port

this default var lets a user override to a value like 127.0.0.1 if the port isn't needed.

Related Issue

(https://github.com/mrlesmithjr/ansible-dnsmasq/issues/37)

as able to duplicate issue with latest debian

before

root@nanopi-r5s:/etc# dig google.com
dig: parse of /etc/resolv.conf failed

after

root@nanopi-r5s:/etc# dig google.com

; <<>> DiG 9.18.16-1-Debian <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61085
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             112     IN      A       142.251.163.139
google.com.             112     IN      A       142.251.163.113
google.com.             112     IN      A       142.251.163.101
google.com.             112     IN      A       142.251.163.138
google.com.             112     IN      A       142.251.163.100
google.com.             112     IN      A       142.251.163.102

;; Query time: 9 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Tue Sep 05 23:52:20 UTC 2023
;; MSG SIZE  rcvd: 135

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • [x ] I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mrlesmithjr mrlesmithjr merged commit 97e023b into mrlesmithjr:master Sep 7, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants