-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Configure default DNS resolver in 6lbr example #21117
Configure default DNS resolver in 6lbr example #21117
Conversation
For convenience, it would be nice to have DNS resolution enabled by default in the examples. Hence, this patch configures a default DNS resolver on the 6lbr example and propagates its via RDNSS option in RAs to the nodes.
examples/gnrc_border_router/Makefile
Outdated
@@ -39,8 +39,9 @@ USEMODULE += ps | |||
# Optionally include DNS support. This includes resolution of names at an | |||
# upstream DNS server and the handling of RDNSS options in Router Advertisements | |||
# to auto-configure that upstream DNS server. | |||
#USEMODULE += sock_dns # include DNS client | |||
#USEMODULE += gnrc_ipv6_nib_dns # include RDNSS option handling | |||
USEMODULE += sock_dns # include DNS client |
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.
USEMODULE += sock_dns # include DNS client | |
USEMODULE += dns_cache # cache DNS responses | |
USEMODULE += sock_dns # include DNS client |
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.
Also, I think here too some ENABLE_DNS ?= 1
switch or something of the like would be helpful, in case e.g. you don't want the border router include RDNSS options in its RAs (e.g. to prevent RA fragmentation).
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.
I tried to address both comments in my latest commit.
Introduces two Makefile switches for enabling DNS resolution and caching.
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.
Untested ACK, but this just adds modules so any issue should be picked up by the CI.
Contribution description
For convenience, it would be nice to have DNS resolution enabled by default in the examples. Hence, this patch configures a default DNS resolver on the 6lbr example and propagates its via RDNSS option in RAs to the nodes.
Once again the tradeoff is some increased ROM and RAM usage.
Testing procedure
BOARD=nrf52840dongle make -C examples/gnrc_border_router clean all flash ULINK=cdc-ecm
.gnrc_networking
while enablingUSEMODULE += sock_dns
andUSEMODULE += gnrc_ipv6_nib_dns
.ping riot-os.org
.Issues/PRs references
Can be tested with #21116.