Opened 15 years ago

Closed 15 years ago

#5636 closed enhancement (fixed)

[PATCH] Move resolv.conf updating from DHCP Client to net_server

Reported by: vegardw Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/net_server Version: R1/Development
Keywords: resolv.conf DHCP Cc:
Blocked By: Blocking:
Platform: All

Description

I'm currently working on a patch that will move the updating of resolv.conf from the DHCP client to the net_server.

The way I've invisioned it is to define a separate kMsgConfigureResolver message that is sent to the net_server from the DHCP client. The rationale for creating a new message and not adding the info to the existing kMsgConfigureInterface message is that the resolver settings is system wide, not really Interface-specific.

This could also be used by when the network preflet need to update resolv.conf instead of the preflet writing the file by itself as it does now.

Does this seem like a good way to handle the resolv.conf updating?

Attachments (1)

netserver_resolver_conf.patch (8.4 KB ) - added by vegardw 15 years ago.
Updated patch

Download all attachments as: .zip

Change History (5)

comment:1 by vegardw, 15 years ago

Summary: Move resolv.conf updating from DHCP Client to net_server[PATCH] Move resolv.conf updating from DHCP Client to net_server

Initial attempt attached. Please review.

comment:2 by axeld, 15 years ago

Looks good, thanks! I think I would make the third argument of _ParseOptions() a reference, though, so that you don't have to check for its validity - and if one want to choose between different offers, you will have to take its data into account, anyway.

There are a few style issues, though, like '{' on the next line, missing space between "for" and '(', extra spaces after '(', etc. Also, I think I would rename fResolverConfig to fResolverConfiguration in order to make it fit better to the existing fConfiguration.

by vegardw, 15 years ago

Updated patch

comment:3 by vegardw, 15 years ago

Attached updated patch with issued noted by axeld addressed

comment:4 by axeld, 15 years ago

Resolution: fixed
Status: newclosed

Thanks for your work! I've applied it now in hrev36135.

There were some minor coding style issues (missing spaces around operators, 80 character line limit, extra curly braces), and I've somewhat simplified NetServer::_ConfigureResolver().

Note: See TracTickets for help on using tickets.