openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

config: add an option to indicate the availability of dns server on interfaces #163

Closed icpz closed 3 years ago

icpz commented 3 years ago

In some cases the IPv6 dns server is not available on the LAN interface, thus we don't want ra/dhcpv6 server to announce the ipv6 address as dns to clients.

Currently, the ra server has 'ra_dns' option to disable the function, but there is no option for dhcpv6. I think a new option 'dnsvalid' to indicate the availability of dns server on specific interface would be better. (I'm not sure if the phrase 'dnsvalid' is suitable for this purpose.)

Thanks!

dedeckeh commented 3 years ago

I would rather call the config option dns_service. But the PR has formal issues as no SoB is present in the git commit desription (see https://openwrt.org/submitting-patches). Also you should add the reason why you want this config option to the git commit description

icpz commented 3 years ago

Thanks for the reply! I've updated the branch

dedeckeh commented 3 years ago

General remark the config option should as well enable/disable sending of DNS server(s) via DHCPv4

icpz commented 3 years ago

Updated, thanks!

The new option takes effect for DHCPv4 now.

dedeckeh commented 3 years ago

Patch pushed to master (https://git.openwrt.org/?p=project/odhcpd.git;a=commit;h=694148a87fa5a0c964286fdaac1fa490a2fb530b); thx