bootp and ignore dhcp?
Scott Moser
smoser at brickies.net
Fri Jul 27 16:20:56 UTC 2007
On Wed, 25 Jul 2007, Scott Moser wrote:
> Is there a way that I can configure dhcpd to answer the bootp
> requests for known clients, but ignore *all* other requests ? If its
> not possible, does anyone have any other suggestions to accomplish what
> I'm after?
In effort to do this, I set up config like:
subnet 192.168.76.0 netmask 255.255.252.0 {
ignore unknown-clients;
ignore booting;
allow bootp;
filename "/yaboot";
host my-host {
hardware ethernet 00:0d:60:1e:e0:9b;
fixed-address my-host.domain.com;
}
}
If I add "ignore booting" option, then I cannot serve the bootp request.
If I "allow booting", then I'll answer this client's dhcp requests also.
The relevant code is bootp function in server/bootp.c (as shown below).
I'm not exactly sure what the "booting" option is supposed to imply. In
my experience, affects dhcp requests, but also (because of this code)
bootp requests. I would have thought it was only intended to cover
dhcp. Can anyone explain why the second stanza (SV_ALLOW_BOOTING) is
present below?
For the moment, I've just #ifdef'd it out, and I appear to be getting
the results that I wanted.
---- snippit from server/bootp.c ----
/* Drop the request if it's not allowed for this client. */
if ((oc = lookup_option (&server_universe, options, SV_ALLOW_BOOTP)) &&
!evaluate_boolean_option_cache (&ignorep, packet, lease,
(struct client_state *)0,
packet -> options, options,
&lease -> scope, oc, MDL)) {
if (!ignorep)
log_info ("%s: bootp disallowed", msgbuf);
goto out;
}
if ((oc = lookup_option (&server_universe,
options, SV_ALLOW_BOOTING)) &&
!evaluate_boolean_option_cache (&ignorep, packet, lease,
(struct client_state *)0,
packet -> options, options,
&lease -> scope, oc, MDL)) {
if (!ignorep)
log_info ("%s: booting disallowed", msgbuf);
goto out;
}
More information about the dhcp-users
mailing list