Commit df598b3e authored by Ted Lemon's avatar Ted Lemon

Add support for NetWare/IP encapsulated option.

parent ea4eec7e
......@@ -22,7 +22,7 @@
#ifndef lint
static char copyright[] =
"$Id: dhcp.c,v 1.131 2000/01/05 18:16:36 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
"$Id: dhcp.c,v 1.132 2000/01/08 01:47:37 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -626,6 +626,23 @@ void dhcpinform (packet)
}
}
/* Make an encapsulation for the NWIP suboptions if the client
asked for them. */
i = DHO_NWIP_SUBOPTIONS;
if (!lookup_option (&dhcp_universe, options, i)) {
oc = (struct option_cache *)0;
if (option_cache_allocate (&oc, "dhcpinform")) {
memset (&d1, 0, sizeof d1);
d1.data = "nwip";
d1.len = 4;
if (make_encapsulation (&oc -> expression, &d1)) {
oc -> option = dhcp_universe.options [i];
save_option (&dhcp_universe, options, oc);
}
option_cache_dereference (&oc, "dhcpinform");
}
}
/* If we've been given a vendor option space, and there's something
in it, and we weren't given a vendor-encapsulated-options option,
then cons one up. */
......@@ -1787,6 +1804,24 @@ void ack_lease (packet, lease, offer, when, msg)
option_cache_dereference (&oc, "ack_lease");
}
/* Make an encapsulation for the NWIP suboptions if the client
asked for them. */
i = DHO_NWIP_SUBOPTIONS;
if (!(oc = lookup_option (&dhcp_universe, state -> options, i))) {
oc = (struct option_cache *)0;
if (option_cache_allocate (&oc, "dhcpinform")) {
memset (&d1, 0, sizeof d1);
d1.data = "nwip";
d1.len = 4;
if (make_encapsulation (&oc -> expression, &d1)) {
oc -> option = dhcp_universe.options [i];
save_option (&dhcp_universe,
state -> options, oc);
}
option_cache_dereference (&oc, "dhcpinform");
}
}
/* If we've been given a vendor option space, and there's something
in it, and we weren't given a vendor-encapsulated-options option,
then cons one up. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment