forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LookupServer: Modernize load_etc_hosts()
This reworks the LookupServer::load_etc_hosts() method to use the IPv4Address APIs instead of trying to parse an IPv4 address itself. It also adds a few error checks for invalid entries in /etc/hosts, trims away leading and trailing whitespace from lines and tries to use StringView over String.
- Loading branch information
Showing
1 changed file
with
31 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters