[PATCH] bootparamd enhancement/fix
omen-pub at omenlabs.com
omen-pub at omenlabs.com
Thu Dec 1 14:52:53 PST 2005
Figured I'd throw this out to the list before filing a PR.
http://www.omenlabs.com/freebsd/bootparamd.patch
This patch is against 6.0-Release
There are two issues with bootparamd that I ran into trying to
get Solaris Jumpstart working nicely. One was permitting null
hostnames. Certain options are passed to the jumpstart client
using /etc/bootparams file entries like "term=:vt100". The current
implementation only makes an exception for the file "dump=..." and
will not return anything else if it can not be resolved. I have
added in a check to return an address of 0.0.0.0 if the length of
the hostname is zero.
The second issue is a little more significant. If a router
address is not supplied using the -r option, bootparamd uses the
function get_myaddress(3) to determine the address of the host.
The bootparamd(8) man page states:
-r router The default router (a machine or an IP-address). This
defaults to the machine running the server.
The function get_myaddress always returns INADDR_LOOPBACK. This
qualify as a bug. Using -r solves this problem, unless you are
running on multiple networks. The patch attempts to make rpc.bootparamd
more intelligent. If -r is not supplied, the ip address of the
client is checked against all configured network interfaces on the
host in the function myaddr. If the client is on a local subnet,
the ip address of the server on that network is returned (if not,
INADDR_LOOPBACK). This allows for whoami on multiple networks.
John
More information about the freebsd-hackers
mailing list