Page MenuHomeFreeBSD

libc/resolv: Refactor the configuration parser
Needs ReviewPublic

Authored by des on Sun, Jun 28, 8:13 AM.
Tags
None
Referenced Files
F160952476: D57924.diff
Mon, Jun 29, 9:19 AM
Unknown Object (File)
Sun, Jun 28, 9:41 AM
Subscribers

Details

Reviewers
kevans
markj
Summary

This was previously all a single loop in res_init(), apart from option
parsing which we cleaned up in a previous commit. Break it out into
separate functions for reading the configuration line by line, setting
the default domain, setting the search list, and adding a nameserver
to the nameserver list. Sprinkle bounds checks and code comments all
around.

The sortlist code, which has been disabled for the past 20 years, will
be dealt with in a separate commit.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74356
Build 71239: arc lint + arc unit