hickory-dns / resolv-conf

The /etc/resolv.conf file parser in rust
Apache License 2.0
27 stars 25 forks source link

domain should hava a default value #9

Closed cssivision closed 6 years ago

cssivision commented 7 years ago

If no domain entry is present, the domain is determined from the local hostname returned by gethostname(2)

tailhook commented 7 years ago

Hi! Thank you for a review. Still I think this crate must be only a parser of resolv.conf file. For example in OS X there are /etc/resolve/* files, which have the same format but domain option treated differently.

On the other hand we may make a method: .get_domain_or_fallback() to do that (the other thing it might have to do is look LOCALDOMAIN env variable). Would you like to make a PR? (but note #6)

cssivision commented 7 years ago

it seems https://github.com/tailhook/resolv-conf/pull/6 is a big change, i will fire a pr after it is merged.

tailhook commented 6 years ago

6 is landed. This is a good time to discuss API for this issue so that we don't need to make a breaking release again.