[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/sbin/dhclient-script bug



I use openbsd as my NAT box at home, and I discovered a bug in the
/sbin/dhclient-script when I prepend a domain-name in /etc/dhclient.conf.

If I have this configuration for dhclient.conf

-- /etc/dhclient.conf --
initial-interval 1;
send host-name "router";
send dhcp-lease-time 604800;
request subnet-mask, broadcast-address, routers,
       domain-name, domain-name-servers, host-name;
prepend domain-name "localnet ";
prepend domain-name-servers 127.0.0.1;
-- /etc/dhclient.conf --

it will error in /sbin/dhclient-script at line 108 saying that the error
is what my service provider gives me as a domain-name.  The simple fix is
to change line 91 from

  if [ x$new_domain_name != x ];

to

  if [ "x$new_domain_name" != "x" ];

and it works.

-- 
Matt Beito