- Upgrade to ISC dhcp-3.1.0

- Remove unnecessary /usr/include/dhcp4client/isc_dhcp headers
- Make sure restorecon is run on /var/lib/dhcpd/dhcpd.leases (#251688)
- Install dhcp.schema to /etc/openldap/dhcp.schema (#330471)
This commit is contained in:
David Cantrell 2007-10-23 19:04:57 +00:00
parent 1369c59e10
commit af3980861c
15 changed files with 1624 additions and 3413 deletions

View File

@ -1 +1 @@
dhcp-3.0.6.tar.gz
dhcp-3.1.0.tar.gz

View File

@ -43,6 +43,13 @@ MINIRES_SRCS = minires_ns_date.c minires_ns_name.c minires_ns_parse.c \
minires_res_mkupdate.c minires_res_query.c minires_res_send.c \
minires_res_sendsigned.c minires_res_update.c
# ISC dhcp headers we need to copy to /usr/include/dhcp4client
DHCP_HEADERS = dhcpd.h cdefs.h osdep.h arpa/nameser.h minires/minires.h \
site.h cf/linux.h dhcp.h statement.h tree.h inet.h dhctoken.h \
omapip/omapip_p.h failover.h ctrace.h minires/resolv.h \
minires/res_update.h omapip/convert.h omapip/hash.h \
omapip/trace.h
HDRS = dhcp4client.h libdhcp_control.h
SRCS = $(COMMON_SRCS) $(CLIENT_SRCS)
OBJS = $(SRCS:.c=.o)
@ -59,11 +66,9 @@ install: all
install -p -m 0644 -D libdhcp4client.a $(DESTDIR)$(LIBDIR)/libdhcp4client.a
install -p -m 0644 -D dhcp4client.h $(DESTDIR)$(INCDIR)/dhcp4client/dhcp4client.h
install -p -m 0644 -D libdhcp_control.h $(DESTDIR)$(INCDIR)/dhcp4client/libdhcp_control.h
( cd $(TOP)/includes ; \
find . -name "*.h" -type f | while read h ; do \
install -p -m 0644 -D $$h $(DESTDIR)$(INCDIR)/dhcp4client/isc_dhcp/$$h ; \
done ; \
)
for hdr in $(DHCP_HEADERS) ; do \
install -p -m 0644 -D $(TOP)/includes/$${hdr} $(DESTDIR)$(INCDIR)/dhcp4client/$${hdr} ; \
done
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)

View File

@ -1,76 +0,0 @@
--- dhcp-3.0.5/client/clparse.c.anycast 2007-06-18 10:53:24.000000000 -0400
+++ dhcp-3.0.5/client/clparse.c 2007-06-18 10:53:24.000000000 -0400
@@ -402,6 +402,17 @@ void parse_client_statement (cfile, ip,
}
return;
+ case ANYCAST_MAC:
+ token = next_token (&val, (unsigned *)0, cfile);
+ if (ip) {
+ parse_hardware_param (cfile, &ip -> anycast_mac_addr);
+ } else {
+ parse_warn (cfile, "anycast mac address parameter %s",
+ "not allowed here.");
+ skip_to_semi (cfile);
+ }
+ return;
+
case REQUEST:
token = next_token (&val, (unsigned *)0, cfile);
if (config -> requested_options == default_requested_options)
--- dhcp-3.0.5/common/conflex.c.anycast 2007-06-18 10:53:24.000000000 -0400
+++ dhcp-3.0.5/common/conflex.c 2007-06-18 10:53:24.000000000 -0400
@@ -549,6 +549,8 @@ static enum dhcp_token intern (atom, dfv
}
if (!strcasecmp (atom + 1, "nd"))
return AND;
+ if (!strcasecmp (atom + 1, "nycast-mac"))
+ return ANYCAST_MAC;
if (!strcasecmp (atom + 1, "ppend"))
return APPEND;
if (!strcasecmp (atom + 1, "llow"))
--- dhcp-3.0.5/common/lpf.c.anycast 2007-06-18 10:53:24.000000000 -0400
+++ dhcp-3.0.5/common/lpf.c 2007-06-18 10:53:48.000000000 -0400
@@ -332,6 +332,9 @@ ssize_t send_packet (interface, packet,
return send_fallback (interface, packet, raw,
len, from, to, hto);
+ if (hto == NULL && interface->anycast_mac_addr.hlen)
+ hto = &interface->anycast_mac_addr;
+
/* Assemble the headers... */
assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
fudge = hbufp % 4; /* IP header must be word-aligned. */
--- dhcp-3.0.5/includes/dhctoken.h.anycast 2007-06-18 10:53:24.000000000 -0400
+++ dhcp-3.0.5/includes/dhctoken.h 2007-06-18 10:53:24.000000000 -0400
@@ -310,7 +310,8 @@ enum dhcp_token {
DO_FORWARD_UPDATE = 614,
KNOWN_CLIENTS = 615,
ATSFP = 616,
- BOOTP_BROADCAST_ALWAYS = 617
+ BOOTP_BROADCAST_ALWAYS = 617,
+ ANYCAST_MAC = 618
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
--- dhcp-3.0.5/includes/site.h.anycast 2007-06-18 10:53:24.000000000 -0400
+++ dhcp-3.0.5/includes/site.h 2007-06-18 10:53:24.000000000 -0400
@@ -178,6 +178,8 @@
#define TRACING
+#define USE_LPF
+
/* Define this if you want to read your config from LDAP. Read README.ldap
about how to set this up */
--- dhcp-3.0.5/includes/dhcpd.h.anycast 2007-06-18 10:53:24.000000000 -0400
+++ dhcp-3.0.5/includes/dhcpd.h 2007-06-18 10:53:24.000000000 -0400
@@ -845,6 +845,7 @@ struct interface_info {
int dlpi_sap_length;
struct hardware dlpi_broadcast_addr;
# endif /* DLPI_SEND || DLPI_RECEIVE */
+ struct hardware anycast_mac_addr;
};
struct hardware_link {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,82 @@
diff -up dhcp-3.1.0/common/lpf.c.anycast dhcp-3.1.0/common/lpf.c
--- dhcp-3.1.0/common/lpf.c.anycast 2007-10-22 16:16:48.000000000 -0400
+++ dhcp-3.1.0/common/lpf.c 2007-10-22 16:19:01.000000000 -0400
@@ -334,6 +334,9 @@ ssize_t send_packet (interface, packet,
return send_fallback (interface, packet, raw,
len, from, to, hto);
+ if (hto == NULL && interface->anycast_mac_addr.hlen)
+ hto = &interface->anycast_mac_addr;
+
/* Assemble the headers... */
assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
fudge = hbufp % 4; /* IP header must be word-aligned. */
diff -up dhcp-3.1.0/common/conflex.c.anycast dhcp-3.1.0/common/conflex.c
--- dhcp-3.1.0/common/conflex.c.anycast 2007-10-22 16:16:47.000000000 -0400
+++ dhcp-3.1.0/common/conflex.c 2007-10-22 16:18:52.000000000 -0400
@@ -549,6 +549,8 @@ static enum dhcp_token intern (atom, dfv
}
if (!strcasecmp (atom + 1, "nd"))
return AND;
+ if (!strcasecmp (atom + 1, "nycast-mac"))
+ return ANYCAST_MAC;
if (!strcasecmp (atom + 1, "ppend"))
return APPEND;
if (!strcasecmp (atom + 1, "llow"))
diff -up dhcp-3.1.0/includes/site.h.anycast dhcp-3.1.0/includes/site.h
--- dhcp-3.1.0/includes/site.h.anycast 2007-10-22 16:16:47.000000000 -0400
+++ dhcp-3.1.0/includes/site.h 2007-10-22 16:19:43.000000000 -0400
@@ -184,6 +184,8 @@
#define TRACING
+#define USE_LPF
+
/* Define this if you want to read your config from LDAP. Read README.ldap
about how to set this up */
diff -up dhcp-3.1.0/includes/dhcpd.h.anycast dhcp-3.1.0/includes/dhcpd.h
--- dhcp-3.1.0/includes/dhcpd.h.anycast 2007-10-22 16:16:48.000000000 -0400
+++ dhcp-3.1.0/includes/dhcpd.h 2007-10-22 16:19:17.000000000 -0400
@@ -990,6 +990,7 @@ struct interface_info {
int dlpi_sap_length;
struct hardware dlpi_broadcast_addr;
# endif /* DLPI_SEND || DLPI_RECEIVE */
+ struct hardware anycast_mac_addr;
};
struct hardware_link {
diff -up dhcp-3.1.0/includes/dhctoken.h.anycast dhcp-3.1.0/includes/dhctoken.h
--- dhcp-3.1.0/includes/dhctoken.h.anycast 2007-10-22 16:16:48.000000000 -0400
+++ dhcp-3.1.0/includes/dhctoken.h 2007-10-22 16:20:33.000000000 -0400
@@ -326,7 +326,8 @@ enum dhcp_token {
DOMAIN_LIST = 630,
LEASEQUERY = 631,
EXECUTE = 632,
- BOOTP_BROADCAST_ALWAYS = 633
+ BOOTP_BROADCAST_ALWAYS = 633,
+ ANYCAST_MAC = 634
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
diff -up dhcp-3.1.0/client/clparse.c.anycast dhcp-3.1.0/client/clparse.c
--- dhcp-3.1.0/client/clparse.c.anycast 2007-10-22 16:16:48.000000000 -0400
+++ dhcp-3.1.0/client/clparse.c 2007-10-22 16:18:40.000000000 -0400
@@ -407,6 +407,17 @@ void parse_client_statement (cfile, ip,
}
return;
+ case ANYCAST_MAC:
+ token = next_token (&val, (unsigned *)0, cfile);
+ if (ip) {
+ parse_hardware_param (cfile, &ip -> anycast_mac_addr);
+ } else {
+ parse_warn (cfile, "anycast mac address parameter %s",
+ "not allowed here.");
+ skip_to_semi (cfile);
+ }
+ return;
+
case REQUEST:
token = next_token (&val, (unsigned *)0, cfile);
if (config -> requested_options == default_requested_options)

View File

@ -1,7 +1,7 @@
diff -up dhcp-3.0.6/client/dhclient.c.usage dhcp-3.0.6/client/dhclient.c
--- dhcp-3.0.6/client/dhclient.c.usage 2007-08-15 11:48:12.000000000 -0400
+++ dhcp-3.0.6/client/dhclient.c 2007-08-15 11:50:22.000000000 -0400
@@ -808,16 +808,25 @@ int main (argc, argv, envp)
diff -up dhcp-3.1.0/client/dhclient.c.usage dhcp-3.1.0/client/dhclient.c
--- dhcp-3.1.0/client/dhclient.c.usage 2007-10-22 15:52:06.000000000 -0400
+++ dhcp-3.1.0/client/dhclient.c 2007-10-22 15:54:21.000000000 -0400
@@ -818,16 +818,25 @@ int main (argc, argv, envp)
static void usage ()
{
@ -10,7 +10,7 @@ diff -up dhcp-3.0.6/client/dhclient.c.usage dhcp-3.0.6/client/dhclient.c
- log_info (arr);
- log_info (url);
-
- log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
- log_error ("Usage: dhclient [-1dqrx] [-nw] [-p <port>] %s",
- "[-s server]");
- log_error (" [-cf config-file] [-lf lease-file]%s",
- "[-pf pid-file] [-e VAR=val]");

View File

@ -1,214 +1,35 @@
--- dhcp-3.0.5/common/conflex.c.ldap 2006-02-22 17:43:27.000000000 -0500
+++ dhcp-3.0.5/common/conflex.c 2007-03-29 15:11:19.000000000 -0400
@@ -47,6 +47,7 @@
static enum dhcp_token read_number PROTO ((int, struct parse *));
static enum dhcp_token read_num_or_name PROTO ((int, struct parse *));
static enum dhcp_token intern PROTO ((char *, enum dhcp_token));
+static int read_function PROTO ((struct parse *));
isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp)
struct parse **cfile;
@@ -74,6 +75,10 @@
tmp -> file = file;
tmp -> eol_token = eolp;
+ if (file != -1) {
+ tmp -> read_function = read_function;;
+ }
+
tmp -> bufix = 0;
tmp -> buflen = buflen;
if (inbuf) {
@@ -113,22 +118,11 @@
int c;
if (cfile -> bufix == cfile -> buflen) {
- if (cfile -> file != -1) {
- cfile -> buflen =
- read (cfile -> file,
- cfile -> inbuf, cfile -> bufsiz);
- if (cfile -> buflen == 0) {
- c = EOF;
- cfile -> bufix = 0;
- } else if (cfile -> buflen < 0) {
- c = EOF;
- cfile -> bufix = cfile -> buflen = 0;
- } else {
- c = cfile -> inbuf [0];
- cfile -> bufix = 1;
- }
- } else
+ if (cfile -> read_function) {
+ c = cfile -> read_function (cfile);
+ } else {
c = EOF;
+ }
} else {
c = cfile -> inbuf [cfile -> bufix];
cfile -> bufix++;
@@ -1128,3 +1122,25 @@
}
return dfv;
}
+
+
+static int
+read_function (struct parse * cfile)
+{
+ int c;
+
+ cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
+ if (cfile -> buflen == 0) {
+ c = EOF;
+ cfile -> bufix = 0;
+ } else if (cfile -> buflen < 0) {
+ c = EOF;
+ cfile -> bufix = cfile -> buflen = 0;
+ } else {
+ c = cfile -> inbuf [0];
+ cfile -> bufix = 1;
+ }
+
+ return c;
+}
+
--- dhcp-3.0.5/common/print.c.ldap 2007-03-29 15:10:26.000000000 -0400
+++ dhcp-3.0.5/common/print.c 2007-03-29 15:11:19.000000000 -0400
@@ -166,9 +166,9 @@
}
char *print_hw_addr (htype, hlen, data)
- int htype;
- int hlen;
- unsigned char *data;
+ const int htype;
+ const int hlen;
+ const unsigned char *data;
diff -up dhcp-3.1.0/server/mdb.c.ldap dhcp-3.1.0/server/mdb.c
--- dhcp-3.1.0/server/mdb.c.ldap 2007-06-08 14:57:02.000000000 -0400
+++ dhcp-3.1.0/server/mdb.c 2007-10-22 16:29:48.000000000 -0400
@@ -454,6 +454,12 @@ int find_hosts_by_haddr (struct host_dec
{
static char habuf [49];
char *s;
--- dhcp-3.0.5/includes/dhcpd.h.ldap 2007-03-29 15:10:26.000000000 -0400
+++ dhcp-3.0.5/includes/dhcpd.h 2007-03-29 15:11:19.000000000 -0400
@@ -79,6 +79,11 @@
#include <isc-dhcp/result.h>
#include <omapip/omapip_p.h>
struct host_decl *foo;
struct hardware h;
+ int ret;
+
+#if defined(LDAP_CONFIGURATION)
+# include <ldap.h>
+# include <sys/utsname.h> /* for uname() */
+ if ((ret = find_haddr_in_ldap (hp, htype, hlen, haddr, file, line)))
+ return ret;
+#endif
+
#if !defined (OPTION_HASH_SIZE)
# define OPTION_HASH_SIZE 17
# define OPTION_HASH_PTWO 32 /* Next power of two above option hash. */
@@ -139,6 +144,8 @@
char *inbuf;
unsigned bufix, buflen;
unsigned bufsiz;
+
+ int (*read_function) (struct parse *);
};
/* Variable-length array of data. */
@@ -244,6 +251,27 @@
u_int8_t hbuf [17];
};
+#if defined(LDAP_CONFIGURATION)
+# define LDAP_BUFFER_SIZE 8192
+# define LDAP_METHOD_STATIC 0
+# define LDAP_METHOD_DYNAMIC 1
+
+/* This is a tree of the current configuration we are building from LDAP */
+
+struct ldap_config_stack {
+ LDAPMessage * res; /* Pointer returned from ldap_search */
+ LDAPMessage * ldent; /* Current item in LDAP that we're processing
+ in res */
+ int close_brace; /* Put a closing } after we're through with
+ this item */
+ int processed; /* We set this flag if this base item has been
+ processed. After this base item is processed,
+ we can start processing the children */
+ struct ldap_config_stack *children;
+ struct ldap_config_stack *next;
+};
+#endif
+
typedef enum {
server_startup = 0,
server_running = 1,
@@ -426,6 +454,15 @@
# define DEFAULT_PING_TIMEOUT 1
#endif
+#if defined(LDAP_CONFIGURATION)
+# define SV_LDAP_SERVER 47
+# define SV_LDAP_PORT 48
+# define SV_LDAP_USERNAME 49
+# define SV_LDAP_PASSWORD 50
+# define SV_LDAP_BASE_DN 51
+# define SV_LDAP_METHOD 52
+#endif
+
#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
# define DEFAULT_DEFAULT_LEASE_TIME 43200
#endif
@@ -1531,7 +1568,7 @@
char *quotify_string (const char *, const char *, int);
char *quotify_buf (const unsigned char *, unsigned, const char *, int);
char *print_base64 (const unsigned char *, unsigned, const char *, int);
-char *print_hw_addr PROTO ((int, int, unsigned char *));
+char *print_hw_addr PROTO ((const int, const int, const unsigned char *));
void print_lease PROTO ((struct lease *));
void dump_raw PROTO ((const unsigned char *, unsigned));
void dump_packet_option (struct option_cache *, struct packet *,
@@ -2639,3 +2676,14 @@
#endif /* FAILOVER_PROTOCOL */
const char *binding_state_print (enum failover_state);
+
+/* ldap.c */
+#if defined(LDAP_CONFIGURATION)
+extern struct enumeration ldap_methods;
+isc_result_t ldap_read_config (void);
+int find_haddr_in_ldap (struct host_decl **, int, unsigned,
+ const unsigned char *, const char *, int);
+int find_subclass_in_ldap (struct class *, struct class **,
+ struct data_string *);
+#endif
+
--- dhcp-3.0.5/includes/site.h.ldap 2002-03-12 13:33:39.000000000 -0500
+++ dhcp-3.0.5/includes/site.h 2007-03-29 15:11:19.000000000 -0400
@@ -177,3 +177,13 @@
traces. */
#define TRACING
+
+/* Define this if you want to read your config from LDAP. Read README.ldap
+ about how to set this up */
+
+#define LDAP_CONFIGURATION
+
+#define _PATH_DHCPD_DB "/var/lib/dhcpd/dhcpd.leases"
+#define _PATH_DHCLIENT_DB "/var/lib/dhclient/dhclient.leases"
+#define _PATH_DHCPD_DB "/var/lib/dhcpd/dhcpd.leases"
+#define _PATH_DHCLIENT_DB "/var/lib/dhclient/dhclient.leases"
--- dhcp-3.0.5/server/Makefile.dist.ldap 2004-06-10 13:59:50.000000000 -0400
+++ dhcp-3.0.5/server/Makefile.dist 2007-03-29 15:11:19.000000000 -0400
h.hlen = hlen + 1;
h.hbuf [0] = htype;
diff -up dhcp-3.1.0/server/Makefile.dist.ldap dhcp-3.1.0/server/Makefile.dist
--- dhcp-3.1.0/server/Makefile.dist.ldap 2006-07-25 09:26:00.000000000 -0400
+++ dhcp-3.1.0/server/Makefile.dist 2007-10-22 16:29:48.000000000 -0400
@@ -25,9 +25,9 @@
CATMANPAGES = dhcpd.cat8 dhcpd.conf.cat5 dhcpd.leases.cat5
SEDMANPAGES = dhcpd.man8 dhcpd.conf.man5 dhcpd.leases.man5
SRCS = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
- omapi.c mdb.c stables.c salloc.c ddns.c
+ omapi.c mdb.c stables.c salloc.c ddns.c ldap.c
- omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c
+ omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c ldap.c
OBJS = dhcpd.o dhcp.o bootp.o confpars.o db.o class.o failover.o \
- omapi.o mdb.o stables.o salloc.o ddns.o
+ omapi.o mdb.o stables.o salloc.o ddns.o ldap.o
- omapi.o mdb.o stables.o salloc.o ddns.o dhcpleasequery.o
+ omapi.o mdb.o stables.o salloc.o ddns.o dhcpleasequery.o ldap.o
PROG = dhcpd
MAN = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
@@ -103,6 +103,6 @@
@@ -106,6 +106,6 @@ dhcpd.leases.man5: dhcpd.leases.5
-e "s#RUNDIR#$(VARRUN)#g" < dhcpd.leases.5 >dhcpd.leases.man5
dhcpd: $(OBJS) $(COBJ) $(DHCPLIB)
@ -216,63 +37,10 @@
+ $(CC) $(LFLAGS) -o dhcpd $(OBJS) $(DHCPLIB) $(LIBS) -lldap
# Dependencies (semi-automatically-generated)
--- dhcp-3.0.5/server/class.c.ldap 2004-06-10 13:59:51.000000000 -0400
+++ dhcp-3.0.5/server/class.c 2007-03-29 15:11:19.000000000 -0400
@@ -90,6 +90,7 @@
int matched = 0;
int status;
int ignorep;
+ int classfound;
for (class = collection -> classes; class; class = class -> nic) {
#if defined (DEBUG_CLASS_MATCHING)
@@ -135,9 +136,19 @@
class -> submatch, MDL));
if (status && data.len) {
nc = (struct class *)0;
- if (class_hash_lookup (&nc, class -> hash,
- (const char *)data.data,
- data.len, MDL)) {
+ classfound = class_hash_lookup (&nc,
+ class -> hash,
+ (const char *)data.data,
+ data.len, MDL);
+
+#ifdef LDAP_CONFIGURATION
+ if (!classfound &&
+ find_subclass_in_ldap (class,
+ &nc, &data))
+ classfound = 1;
+#endif
+
+ if (classfound) {
#if defined (DEBUG_CLASS_MATCHING)
log_info ("matches subclass %s.",
print_hex_1 (data.len,
--- dhcp-3.0.5/server/confpars.c.ldap 2007-03-29 15:10:26.000000000 -0400
+++ dhcp-3.0.5/server/confpars.c 2007-03-29 15:11:19.000000000 -0400
@@ -63,7 +63,17 @@
isc_result_t readconf ()
{
- return read_conf_file (path_dhcpd_conf, root_group, ROOT_GROUP, 0);
+ isc_result_t res;
+
+ res = read_conf_file (path_dhcpd_conf, root_group, ROOT_GROUP, 0);
+#if defined(LDAP_CONFIGURATION)
+ if (res != ISC_R_SUCCESS)
+ return (res);
+
+ return ldap_read_config ();
+#else
+ return (res);
+#endif
}
isc_result_t read_conf_file (const char *filename, struct group *group,
--- dhcp-3.0.5/server/dhcpd.c.ldap 2007-03-29 15:10:26.000000000 -0400
+++ dhcp-3.0.5/server/dhcpd.c 2007-03-29 15:11:19.000000000 -0400
@@ -433,6 +433,9 @@
diff -up dhcp-3.1.0/server/dhcpd.c.ldap dhcp-3.1.0/server/dhcpd.c
--- dhcp-3.1.0/server/dhcpd.c.ldap 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/server/dhcpd.c 2007-10-22 16:29:48.000000000 -0400
@@ -440,6 +440,9 @@ int main (argc, argv, envp)
/* Add the ddns update style enumeration prior to parsing. */
add_enumeration (&ddns_styles);
add_enumeration (&syslog_enum);
@ -282,8 +50,9 @@
if (!group_allocate (&root_group, MDL))
log_fatal ("Can't allocate root group!");
--- /dev/null 2007-03-29 11:34:09.579686084 -0400
+++ dhcp-3.0.5/server/ldap.c 2007-03-29 15:11:19.000000000 -0400
diff -up /dev/null dhcp-3.1.0/server/ldap.c
--- /dev/null 2007-10-22 10:27:59.854008585 -0400
+++ dhcp-3.1.0/server/ldap.c 2007-10-22 16:29:48.000000000 -0400
@@ -0,0 +1,1142 @@
+/* ldap.c
+
@ -1427,47 +1196,81 @@
+
+#endif
+
--- dhcp-3.0.5/server/mdb.c.ldap 2007-03-29 15:10:26.000000000 -0400
+++ dhcp-3.0.5/server/mdb.c 2007-03-29 15:11:19.000000000 -0400
@@ -373,6 +373,12 @@
const char *file, int line)
{
struct hardware h;
+ int ret;
+
+#if defined(LDAP_CONFIGURATION)
+ if ((ret = find_haddr_in_ldap (hp, htype, hlen, haddr, file, line)))
+ return ret;
+#endif
diff -up dhcp-3.1.0/server/confpars.c.ldap dhcp-3.1.0/server/confpars.c
--- dhcp-3.1.0/server/confpars.c.ldap 2007-06-28 13:20:40.000000000 -0400
+++ dhcp-3.1.0/server/confpars.c 2007-10-22 16:29:48.000000000 -0400
@@ -63,7 +63,17 @@ void parse_trace_setup ()
h.hlen = hlen + 1;
h.hbuf [0] = htype;
--- dhcp-3.0.5/server/stables.c.ldap 2004-06-10 13:59:58.000000000 -0400
+++ dhcp-3.0.5/server/stables.c 2007-03-29 15:11:19.000000000 -0400
@@ -483,12 +483,21 @@
{ "log-facility", "Nsyslog-facilities.", &server_universe, 44 },
{ "do-forward-updates", "f", &server_universe, 45 },
{ "ping-timeout", "T", &server_universe, 46 },
isc_result_t readconf ()
{
- return read_conf_file (path_dhcpd_conf, root_group, ROOT_GROUP, 0);
+ isc_result_t res;
+
+ res = read_conf_file (path_dhcpd_conf, root_group, ROOT_GROUP, 0);
+#if defined(LDAP_CONFIGURATION)
+ { "ldap-server", "t", &server_universe, 47 },
+ { "ldap-port", "d", &server_universe, 48 },
+ { "ldap-username", "t", &server_universe, 49 },
+ { "ldap-password", "t", &server_universe, 50 },
+ { "ldap-base-dn", "t", &server_universe, 51 },
+ { "ldap-method", "Nldap-methods.", &server_universe, 52 },
+ if (res != ISC_R_SUCCESS)
+ return (res);
+
+ return ldap_read_config ();
+#else
{ "unknown-47", "X", &server_universe, 47 },
{ "unknown-48", "X", &server_universe, 48 },
{ "unknown-49", "X", &server_universe, 49 },
{ "unknown-50", "X", &server_universe, 50 },
{ "unknown-51", "X", &server_universe, 51 },
{ "unknown-52", "X", &server_universe, 52 },
+ return (res);
+#endif
{ "unknown-53", "X", &server_universe, 53 },
{ "unknown-54", "X", &server_universe, 54 },
{ "unknown-55", "X", &server_universe, 55 },
@@ -694,6 +703,20 @@
{ "option-end", "e", &server_universe, 255 },
}
isc_result_t read_conf_file (const char *filename, struct group *group,
diff -up dhcp-3.1.0/server/class.c.ldap dhcp-3.1.0/server/class.c
--- dhcp-3.1.0/server/class.c.ldap 2006-06-01 16:23:17.000000000 -0400
+++ dhcp-3.1.0/server/class.c 2007-10-22 16:29:48.000000000 -0400
@@ -90,6 +90,7 @@ int check_collection (packet, lease, col
int matched = 0;
int status;
int ignorep;
+ int classfound;
for (class = collection -> classes; class; class = class -> nic) {
#if defined (DEBUG_CLASS_MATCHING)
@@ -135,9 +136,15 @@ int check_collection (packet, lease, col
class -> submatch, MDL));
if (status && data.len) {
nc = (struct class *)0;
- if (class_hash_lookup (&nc, class -> hash,
- (const char *)data.data,
- data.len, MDL)) {
+ classfound = class_hash_lookup (&nc, class -> hash,
+ (const char *)data.data, data.len, MDL);
+
+#ifdef LDAP_CONFIGURATION
+ if (!classfound && find_subclass_in_ldap (class, &nc, &data))
+ classfound = 1;
+#endif
+
+ if (classfound) {
#if defined (DEBUG_CLASS_MATCHING)
log_info ("matches subclass %s.",
print_hex_1 (data.len,
diff -up dhcp-3.1.0/server/stables.c.ldap dhcp-3.1.0/server/stables.c
--- dhcp-3.1.0/server/stables.c.ldap 2007-04-27 18:48:10.000000000 -0400
+++ dhcp-3.1.0/server/stables.c 2007-10-22 16:29:48.000000000 -0400
@@ -238,9 +238,38 @@ static struct option server_options[] =
{ "adaptive-lease-time-threshold", "B", &server_universe, 50, 1 },
{ "do-reverse-updates", "f", &server_universe, 51, 1 },
{ "fqdn-reply", "f", &server_universe, 52, 1 },
+#if defined(LDAP_CONFIGURATION)
+ { "ldap-server", "t", &server_universe, 53 },
+ { "ldap-port", "d", &server_universe, 54 },
+ { "ldap-username", "t", &server_universe, 55 },
+ { "ldap-password", "t", &server_universe, 56 },
+ { "ldap-base-dn", "t", &server_universe, 57 },
+ { "ldap-method", "Nldap-methods.", &server_universe, 58 },
+#else
+ { "unknown-53", "X", &server_universe, 53 },
+ { "unknown-54", "X", &server_universe, 54 },
+ { "unknown-55", "X", &server_universe, 55 },
+ { "unknown-56", "X", &server_universe, 56 },
+ { "unknown-57", "X", &server_universe, 57 },
+ { "unknown-58", "X", &server_universe, 58 },
+#endif
{ NULL, NULL, NULL, 0, 0 }
};
+#if defined(LDAP_CONFIGURATION)
@ -1487,3 +1290,199 @@
struct enumeration_value ddns_styles_values [] = {
{ "none", 0 },
{ "ad-hoc", 1 },
diff -up dhcp-3.1.0/common/print.c.ldap dhcp-3.1.0/common/print.c
--- dhcp-3.1.0/common/print.c.ldap 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/common/print.c 2007-10-22 16:29:48.000000000 -0400
@@ -168,9 +168,9 @@ char *print_base64 (const unsigned char
}
char *print_hw_addr (htype, hlen, data)
- int htype;
- int hlen;
- unsigned char *data;
+ const int htype;
+ const int hlen;
+ const unsigned char *data;
{
static char habuf [49];
char *s;
diff -up dhcp-3.1.0/common/conflex.c.ldap dhcp-3.1.0/common/conflex.c
--- dhcp-3.1.0/common/conflex.c.ldap 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/common/conflex.c 2007-10-22 16:29:48.000000000 -0400
@@ -47,6 +47,7 @@ static enum dhcp_token read_string PROTO
static enum dhcp_token read_number PROTO ((int, struct parse *));
static enum dhcp_token read_num_or_name PROTO ((int, struct parse *));
static enum dhcp_token intern PROTO ((unsigned char *, enum dhcp_token));
+static int read_function PROTO ((struct parse *));
isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp)
struct parse **cfile;
@@ -74,6 +75,10 @@ isc_result_t new_parse (cfile, file, inb
tmp -> file = file;
tmp -> eol_token = eolp;
+ if (file != -1) {
+ tmp -> read_function = read_function;;
+ }
+
tmp -> bufix = 0;
tmp -> buflen = buflen;
if (inbuf) {
@@ -113,22 +118,11 @@ static int get_char (cfile)
int c;
if (cfile -> bufix == cfile -> buflen) {
- if (cfile -> file != -1) {
- cfile -> buflen =
- read (cfile -> file,
- cfile -> inbuf, cfile -> bufsiz);
- if (cfile -> buflen == 0) {
- c = EOF;
- cfile -> bufix = 0;
- } else if (cfile -> buflen < 0) {
- c = EOF;
- cfile -> bufix = cfile -> buflen = 0;
- } else {
- c = cfile -> inbuf [0];
- cfile -> bufix = 1;
- }
- } else
+ if (cfile -> read_function) {
+ c = cfile -> read_function (cfile);
+ } else {
c = EOF;
+ }
} else {
c = cfile -> inbuf [cfile -> bufix];
cfile -> bufix++;
@@ -1213,3 +1207,23 @@ static enum dhcp_token intern (atom, dfv
}
return dfv;
}
+
+static int
+read_function (struct parse * cfile)
+{
+ int c;
+
+ cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
+ if (cfile -> buflen == 0) {
+ c = EOF;
+ cfile -> bufix = 0;
+ } else if (cfile -> buflen < 0) {
+ c = EOF;
+ cfile -> bufix = cfile -> buflen = 0;
+ } else {
+ c = cfile -> inbuf [0];
+ cfile -> bufix = 1;
+ }
+
+ return c;
+}
diff -up dhcp-3.1.0/includes/dhcpd.h.ldap dhcp-3.1.0/includes/dhcpd.h
--- dhcp-3.1.0/includes/dhcpd.h.ldap 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/includes/dhcpd.h 2007-10-22 16:29:56.000000000 -0400
@@ -81,6 +81,11 @@ typedef struct hash_table class_hash_t;
#include <isc-dhcp/result.h>
#include <omapip/omapip_p.h>
+#if defined(LDAP_CONFIGURATION)
+# include <ldap.h>
+# include <sys/utsname.h> /* for uname() */
+#endif
+
#if !defined (BYTE_NAME_HASH_SIZE)
# define BYTE_NAME_HASH_SIZE 401 /* Default would be rediculous. */
#endif
@@ -251,6 +256,8 @@ struct parse {
char *inbuf;
unsigned bufix, buflen;
unsigned bufsiz;
+
+ int (*read_function) (struct parse *);
};
/* Variable-length array of data. */
@@ -362,6 +369,26 @@ struct hardware {
u_int8_t hbuf [17];
};
+#if defined(LDAP_CONFIGURATION)
+# define LDAP_BUFFER_SIZE 8192
+# define LDAP_METHOD_STATIC 0
+# define LDAP_METHOD_DYNAMIC 1
+
+/* This is a tree of the current configuration we are building from LDAP */
+struct ldap_config_stack {
+ LDAPMessage * res; /* Pointer returned from ldap_search */
+ LDAPMessage * ldent; /* Current item in LDAP that we're processing.
+ in res */
+ int close_brace; /* Put a closing } after we're through with
+ this item */
+ int processed; /* We set this flag if this base item has been
+ processed. After this base item is processed,
+ we can start processing the children */
+ struct ldap_config_stack *children;
+ struct ldap_config_stack *next;
+};
+#endif
+
typedef enum {
server_startup = 0,
server_running = 1,
@@ -558,6 +585,15 @@ struct lease_state {
# define DEFAULT_PING_TIMEOUT 1
#endif
+#if defined(LDAP_CONFIGURATION)
+# define SV_LDAP_SERVER 47
+# define SV_LDAP_PORT 48
+# define SV_LDAP_USERNAME 49
+# define SV_LDAP_PASSWORD 50
+# define SV_LDAP_BASE_DN 51
+# define SV_LDAP_METHOD 52
+#endif
+
#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
# define DEFAULT_DEFAULT_LEASE_TIME 43200
#endif
@@ -1702,7 +1738,7 @@ extern int db_time_format;
char *quotify_string (const char *, const char *, int);
char *quotify_buf (const unsigned char *, unsigned, const char *, int);
char *print_base64 (const unsigned char *, unsigned, const char *, int);
-char *print_hw_addr PROTO ((int, int, unsigned char *));
+char *print_hw_addr PROTO ((const int, const int, const unsigned char *));
void print_lease PROTO ((struct lease *));
void dump_raw PROTO ((const unsigned char *, unsigned));
void dump_packet_option (struct option_cache *, struct packet *,
@@ -2812,3 +2848,13 @@ OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_l
#endif /* FAILOVER_PROTOCOL */
const char *binding_state_print (enum failover_state);
+
+/* ldap.c */
+#if defined(LDAP_CONFIGURATION)
+extern struct enumeration ldap_methods;
+isc_result_t ldap_read_config (void);
+int find_haddr_in_ldap (struct host_decl **, int, unsigned,
+ const unsigned char *, const char *, int);
+int find_subclass_in_ldap (struct class *, struct class **,
+ struct data_string *);
+#endif
diff -up dhcp-3.1.0/includes/site.h.ldap dhcp-3.1.0/includes/site.h
--- dhcp-3.1.0/includes/site.h.ldap 2006-07-31 18:19:51.000000000 -0400
+++ dhcp-3.1.0/includes/site.h 2007-10-22 16:29:48.000000000 -0400
@@ -183,3 +183,13 @@
traces. */
#define TRACING
+
+/* Define this if you want to read your config from LDAP. Read README.ldap
+ about how to set this up */
+
+#define LDAP_CONFIGURATION
+
+#define _PATH_DHCPD_DB "/var/lib/dhcpd/dhcpd.leases"
+#define _PATH_DHCLIENT_DB "/var/lib/dhclient/dhclient.leases"
+#define _PATH_DHCPD_DB "/var/lib/dhcpd/dhcpd.leases"
+#define _PATH_DHCLIENT_DB "/var/lib/dhclient/dhclient.leases"

View File

@ -1,6 +1,44 @@
diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
--- dhcp-3.0.6/client/dhclient.c.options 2007-08-15 11:19:40.000000000 -0400
+++ dhcp-3.0.6/client/dhclient.c 2007-08-15 11:43:18.000000000 -0400
diff -up dhcp-3.1.0/common/conflex.c.options dhcp-3.1.0/common/conflex.c
--- dhcp-3.1.0/common/conflex.c.options 2007-10-22 15:46:24.000000000 -0400
+++ dhcp-3.1.0/common/conflex.c 2007-10-22 15:48:07.000000000 -0400
@@ -599,6 +599,8 @@ static enum dhcp_token intern (atom, dfv
return BALANCE;
if (!strcasecmp (atom + 1, "ound"))
return BOUND;
+ if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
+ return BOOTP_BROADCAST_ALWAYS;
break;
case 'c':
if (!strcasecmp (atom + 1, "ase"))
diff -up dhcp-3.1.0/includes/dhcpd.h.options dhcp-3.1.0/includes/dhcpd.h
--- dhcp-3.1.0/includes/dhcpd.h.options 2007-10-22 15:46:24.000000000 -0400
+++ dhcp-3.1.0/includes/dhcpd.h 2007-10-22 15:48:21.000000000 -0400
@@ -912,6 +912,9 @@ struct client_config {
int do_forward_update; /* If nonzero, and if we have the
information we need, update the
A record for the address we get. */
+
+ int bootp_broadcast_always; /* If nonzero, always set the BOOTP_BROADCAST
+ flag in requests */
};
/* Per-interface state used in the dhcp client... */
diff -up dhcp-3.1.0/includes/dhctoken.h.options dhcp-3.1.0/includes/dhctoken.h
--- dhcp-3.1.0/includes/dhctoken.h.options 2006-07-31 18:19:51.000000000 -0400
+++ dhcp-3.1.0/includes/dhctoken.h 2007-10-22 15:49:24.000000000 -0400
@@ -325,7 +325,8 @@ enum dhcp_token {
MIN_BALANCE = 629,
DOMAIN_LIST = 630,
LEASEQUERY = 631,
- EXECUTE = 632
+ EXECUTE = 632,
+ BOOTP_BROADCAST_ALWAYS = 633
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
diff -up dhcp-3.1.0/client/dhclient.c.options dhcp-3.1.0/client/dhclient.c
--- dhcp-3.1.0/client/dhclient.c.options 2007-05-22 16:37:04.000000000 -0400
+++ dhcp-3.1.0/client/dhclient.c 2007-10-22 15:47:51.000000000 -0400
@@ -38,6 +38,12 @@ static char ocopyright[] =
#include "dhcpd.h"
#include "version.h"
@ -24,7 +62,7 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
static void usage PROTO ((void));
@@ -100,6 +109,15 @@ int main (argc, argv, envp)
@@ -101,6 +110,15 @@ int main (argc, argv, envp)
int no_dhclient_pid = 0;
int no_dhclient_script = 0;
char *s;
@ -38,9 +76,9 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
+ char *arg_conf = NULL;
+ int arg_conf_len = 0;
/* Make sure we have stdin, stdout and stderr. */
i = open ("/dev/null", O_RDWR);
@@ -203,6 +221,88 @@ int main (argc, argv, envp)
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
2 (stderr) are open. To do this, we assume that when we
@@ -211,6 +229,88 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "--version")) {
log_info ("isc-dhclient-%s", DHCP_VERSION);
exit (0);
@ -129,7 +167,7 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
} else if (argv [i][0] == '-') {
usage ();
} else {
@@ -339,6 +439,167 @@ int main (argc, argv, envp)
@@ -347,6 +447,167 @@ int main (argc, argv, envp)
/* Parse the dhclient.conf file. */
read_client_conf ();
@ -297,7 +335,7 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
/* Parse the lease database. */
read_client_leases ();
@@ -1912,7 +2173,8 @@ void make_discover (client, lease)
@@ -1978,7 +2239,8 @@ void make_discover (client, lease)
client -> packet.xid = random ();
client -> packet.secs = 0; /* filled in by send_discover. */
@ -307,7 +345,7 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
@@ -1996,7 +2258,9 @@ void make_request (client, lease)
@@ -2065,7 +2327,9 @@ void make_request (client, lease)
} else {
memset (&client -> packet.ciaddr, 0,
sizeof client -> packet.ciaddr);
@ -318,7 +356,7 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
@@ -2055,7 +2319,8 @@ void make_decline (client, lease)
@@ -2125,7 +2389,8 @@ void make_decline (client, lease)
client -> packet.hops = 0;
client -> packet.xid = client -> xid;
client -> packet.secs = 0; /* Filled in by send_request. */
@ -328,10 +366,10 @@ diff -up dhcp-3.0.6/client/dhclient.c.options dhcp-3.0.6/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
diff -up dhcp-3.0.6/client/clparse.c.options dhcp-3.0.6/client/clparse.c
--- dhcp-3.0.6/client/clparse.c.options 2007-08-15 11:19:40.000000000 -0400
+++ dhcp-3.0.6/client/clparse.c 2007-08-15 11:44:34.000000000 -0400
@@ -81,6 +81,7 @@ isc_result_t read_client_conf ()
diff -up dhcp-3.1.0/client/clparse.c.options dhcp-3.1.0/client/clparse.c
--- dhcp-3.1.0/client/clparse.c.options 2007-02-14 17:41:22.000000000 -0500
+++ dhcp-3.1.0/client/clparse.c 2007-10-22 15:47:12.000000000 -0400
@@ -84,6 +84,7 @@ isc_result_t read_client_conf ()
top_level_config.requested_options = default_requested_options;
top_level_config.omapi_port = -1;
top_level_config.do_forward_update = 1;
@ -339,7 +377,7 @@ diff -up dhcp-3.0.6/client/clparse.c.options dhcp-3.0.6/client/clparse.c
group_allocate (&top_level_config.on_receipt, MDL);
if (!top_level_config.on_receipt)
@@ -227,7 +228,8 @@ void read_client_leases ()
@@ -230,7 +231,8 @@ void read_client_leases ()
interface-declaration |
LEASE client-lease-statement |
ALIAS client-lease-statement |
@ -349,7 +387,7 @@ diff -up dhcp-3.0.6/client/clparse.c.options dhcp-3.0.6/client/clparse.c
void parse_client_statement (cfile, ip, config)
struct parse *cfile;
@@ -549,6 +551,12 @@ void parse_client_statement (cfile, ip,
@@ -554,6 +556,12 @@ void parse_client_statement (cfile, ip,
parse_reject_statement (cfile, config);
return;
@ -362,41 +400,3 @@ diff -up dhcp-3.0.6/client/clparse.c.options dhcp-3.0.6/client/clparse.c
default:
lose = 0;
stmt = (struct executable_statement *)0;
diff -up dhcp-3.0.6/includes/dhcpd.h.options dhcp-3.0.6/includes/dhcpd.h
--- dhcp-3.0.6/includes/dhcpd.h.options 2007-08-15 11:19:40.000000000 -0400
+++ dhcp-3.0.6/includes/dhcpd.h 2007-08-15 11:45:51.000000000 -0400
@@ -773,6 +773,9 @@ struct client_config {
int do_forward_update; /* If nonzero, and if we have the
information we need, update the
A record for the address we get. */
+
+ int bootp_broadcast_always; /* If nonzero, always set the BOOTP_BROADCAST
+ flag in requests */
};
/* Per-interface state used in the dhcp client... */
diff -up dhcp-3.0.6/includes/dhctoken.h.options dhcp-3.0.6/includes/dhctoken.h
--- dhcp-3.0.6/includes/dhctoken.h.options 2005-09-22 12:19:57.000000000 -0400
+++ dhcp-3.0.6/includes/dhctoken.h 2007-08-15 11:46:11.000000000 -0400
@@ -309,7 +309,8 @@ enum dhcp_token {
DOMAIN_NAME = 613,
DO_FORWARD_UPDATE = 614,
KNOWN_CLIENTS = 615,
- ATSFP = 616
+ ATSFP = 616,
+ BOOTP_BROADCAST_ALWAYS = 617
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
diff -up dhcp-3.0.6/common/conflex.c.options dhcp-3.0.6/common/conflex.c
--- dhcp-3.0.6/common/conflex.c.options 2007-08-15 11:19:40.000000000 -0400
+++ dhcp-3.0.6/common/conflex.c 2007-08-15 11:45:02.000000000 -0400
@@ -599,6 +599,8 @@ static enum dhcp_token intern (atom, dfv
return BALANCE;
if (!strcasecmp (atom + 1, "ound"))
return BOUND;
+ if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
+ return BOOTP_BROADCAST_ALWAYS;
break;
case 'c':
if (!strcasecmp (atom + 1, "ase"))

View File

@ -1,6 +1,6 @@
diff -up dhcp-3.1.0/relay/dhcrelay.c.warnings dhcp-3.1.0/relay/dhcrelay.c
--- dhcp-3.1.0/relay/dhcrelay.c.warnings 2007-02-14 17:41:23.000000000 -0500
+++ dhcp-3.1.0/relay/dhcrelay.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/relay/dhcrelay.c 2007-10-23 14:33:17.000000000 -0400
@@ -739,7 +739,7 @@ int add_relay_agent_options (ip, packet,
unsigned length;
struct in_addr giaddr;
@ -12,7 +12,7 @@ diff -up dhcp-3.1.0/relay/dhcrelay.c.warnings dhcp-3.1.0/relay/dhcrelay.c
diff -up dhcp-3.1.0/dhcpctl/dhcpctl.c.warnings dhcp-3.1.0/dhcpctl/dhcpctl.c
--- dhcp-3.1.0/dhcpctl/dhcpctl.c.warnings 2005-03-17 15:15:03.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/dhcpctl.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dhcpctl/dhcpctl.c 2007-10-23 14:33:17.000000000 -0400
@@ -101,7 +101,6 @@ dhcpctl_status dhcpctl_connect (dhcpctl_
dhcpctl_handle authinfo)
{
@ -63,7 +63,7 @@ diff -up dhcp-3.1.0/dhcpctl/dhcpctl.c.warnings dhcp-3.1.0/dhcpctl/dhcpctl.c
if (status != ISC_R_SUCCESS)
diff -up dhcp-3.1.0/dhcpctl/cltest.c.warnings dhcp-3.1.0/dhcpctl/cltest.c
--- dhcp-3.1.0/dhcpctl/cltest.c.warnings 2005-03-17 15:15:03.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/cltest.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dhcpctl/cltest.c 2007-10-23 14:33:17.000000000 -0400
@@ -60,9 +60,8 @@ int main (argc, argv)
isc_result_t status, waitstatus;
dhcpctl_handle authenticator;
@ -78,7 +78,7 @@ diff -up dhcp-3.1.0/dhcpctl/cltest.c.warnings dhcp-3.1.0/dhcpctl/cltest.c
const char *interface = 0;
diff -up dhcp-3.1.0/dhcpctl/remote.c.warnings dhcp-3.1.0/dhcpctl/remote.c
--- dhcp-3.1.0/dhcpctl/remote.c.warnings 2005-03-17 15:15:04.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/remote.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dhcpctl/remote.c 2007-10-23 14:33:17.000000000 -0400
@@ -354,8 +354,6 @@ isc_result_t dhcpctl_remote_stuff_values
omapi_object_t *id,
omapi_object_t *p)
@ -90,7 +90,7 @@ diff -up dhcp-3.1.0/dhcpctl/remote.c.warnings dhcp-3.1.0/dhcpctl/remote.c
diff -up dhcp-3.1.0/dhcpctl/callback.c.warnings dhcp-3.1.0/dhcpctl/callback.c
--- dhcp-3.1.0/dhcpctl/callback.c.warnings 2005-03-17 15:15:02.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/callback.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dhcpctl/callback.c 2007-10-23 14:33:17.000000000 -0400
@@ -59,7 +59,6 @@ dhcpctl_status dhcpctl_set_callback (dhc
{
dhcpctl_callback_object_t *callback;
@ -110,7 +110,7 @@ diff -up dhcp-3.1.0/dhcpctl/callback.c.warnings dhcp-3.1.0/dhcpctl/callback.c
diff -up dhcp-3.1.0/dhcpctl/omshell.c.warnings dhcp-3.1.0/dhcpctl/omshell.c
--- dhcp-3.1.0/dhcpctl/omshell.c.warnings 2007-02-14 17:41:22.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/omshell.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dhcpctl/omshell.c 2007-10-23 14:33:17.000000000 -0400
@@ -82,11 +82,9 @@ int main (int argc, char **argv, char **
dhcpctl_handle connection;
dhcpctl_handle authenticator;
@ -134,7 +134,7 @@ diff -up dhcp-3.1.0/dhcpctl/omshell.c.warnings dhcp-3.1.0/dhcpctl/omshell.c
"dotted octet > 255: %s",
diff -up dhcp-3.1.0/omapip/message.c.warnings dhcp-3.1.0/omapip/message.c
--- dhcp-3.1.0/omapip/message.c.warnings 2005-03-17 15:15:22.000000000 -0500
+++ dhcp-3.1.0/omapip/message.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/message.c 2007-10-23 14:33:17.000000000 -0400
@@ -209,8 +209,6 @@ isc_result_t omapi_message_get_value (om
isc_result_t omapi_message_destroy (omapi_object_t *h,
const char *file, int line)
@ -154,8 +154,8 @@ diff -up dhcp-3.1.0/omapip/message.c.warnings dhcp-3.1.0/omapip/message.c
return ISC_R_INVALIDARG;
diff -up dhcp-3.1.0/omapip/alloc.c.warnings dhcp-3.1.0/omapip/alloc.c
--- dhcp-3.1.0/omapip/alloc.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/alloc.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/omapip/alloc.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/omapip/alloc.c 2007-10-23 14:33:17.000000000 -0400
@@ -93,7 +93,6 @@ VOIDPTR dmalloc (size, file, line)
{
unsigned char *foo;
@ -166,7 +166,7 @@ diff -up dhcp-3.1.0/omapip/alloc.c.warnings dhcp-3.1.0/omapip/alloc.c
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
diff -up dhcp-3.1.0/omapip/connection.c.warnings dhcp-3.1.0/omapip/connection.c
--- dhcp-3.1.0/omapip/connection.c.warnings 2005-03-17 15:15:21.000000000 -0500
+++ dhcp-3.1.0/omapip/connection.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/connection.c 2007-10-23 14:33:17.000000000 -0400
@@ -111,10 +111,6 @@ isc_result_t omapi_connect_list (omapi_o
omapi_connection_object_t *obj;
int flag;
@ -189,7 +189,7 @@ diff -up dhcp-3.1.0/omapip/connection.c.warnings dhcp-3.1.0/omapip/connection.c
diff -up dhcp-3.1.0/omapip/protocol.c.warnings dhcp-3.1.0/omapip/protocol.c
--- dhcp-3.1.0/omapip/protocol.c.warnings 2007-05-23 19:30:33.000000000 -0400
+++ dhcp-3.1.0/omapip/protocol.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/protocol.c 2007-10-23 14:33:17.000000000 -0400
@@ -165,7 +165,6 @@ isc_result_t omapi_protocol_send_message
omapi_remote_auth_t *ra;
omapi_value_t *signature;
@ -218,7 +218,7 @@ diff -up dhcp-3.1.0/omapip/protocol.c.warnings dhcp-3.1.0/omapip/protocol.c
diff -up dhcp-3.1.0/omapip/listener.c.warnings dhcp-3.1.0/omapip/listener.c
--- dhcp-3.1.0/omapip/listener.c.warnings 2005-03-17 15:15:22.000000000 -0500
+++ dhcp-3.1.0/omapip/listener.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/listener.c 2007-10-23 14:33:17.000000000 -0400
@@ -68,12 +68,9 @@ isc_result_t omapi_listen_addr (omapi_ob
omapi_addr_t *addr,
int max)
@ -260,7 +260,7 @@ diff -up dhcp-3.1.0/omapip/listener.c.warnings dhcp-3.1.0/omapip/listener.c
diff -up dhcp-3.1.0/omapip/handle.c.warnings dhcp-3.1.0/omapip/handle.c
--- dhcp-3.1.0/omapip/handle.c.warnings 2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/handle.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/handle.c 2007-10-23 14:33:17.000000000 -0400
@@ -76,7 +76,6 @@ static isc_result_t omapi_handle_table_e
isc_result_t omapi_object_handle (omapi_handle_t *h, omapi_object_t *o)
@ -279,7 +279,7 @@ diff -up dhcp-3.1.0/omapip/handle.c.warnings dhcp-3.1.0/omapip/handle.c
if (handle -> type == omapi_datatype_int)
diff -up dhcp-3.1.0/omapip/trace.c.warnings dhcp-3.1.0/omapip/trace.c
--- dhcp-3.1.0/omapip/trace.c.warnings 2007-05-23 19:30:33.000000000 -0400
+++ dhcp-3.1.0/omapip/trace.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/trace.c 2007-10-23 14:33:17.000000000 -0400
@@ -319,7 +319,7 @@ trace_type_t *trace_type_register (const
void (*stop_tracing) (trace_type_t *),
const char *file, int line)
@ -307,7 +307,7 @@ diff -up dhcp-3.1.0/omapip/trace.c.warnings dhcp-3.1.0/omapip/trace.c
diff -up dhcp-3.1.0/omapip/buffer.c.warnings dhcp-3.1.0/omapip/buffer.c
--- dhcp-3.1.0/omapip/buffer.c.warnings 2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/buffer.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/buffer.c 2007-10-23 14:33:17.000000000 -0400
@@ -438,7 +438,6 @@ isc_result_t omapi_connection_writer (om
int bytes_written;
unsigned first_byte;
@ -334,7 +334,7 @@ diff -up dhcp-3.1.0/omapip/buffer.c.warnings dhcp-3.1.0/omapip/buffer.c
diff -up dhcp-3.1.0/omapip/support.c.warnings dhcp-3.1.0/omapip/support.c
--- dhcp-3.1.0/omapip/support.c.warnings 2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/support.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/support.c 2007-10-23 14:33:17.000000000 -0400
@@ -53,7 +53,6 @@ omapi_object_type_t *omapi_type_auth_key
omapi_object_type_t *omapi_object_types;
@ -397,7 +397,7 @@ diff -up dhcp-3.1.0/omapip/support.c.warnings dhcp-3.1.0/omapip/support.c
if (status != ISC_R_SUCCESS)
diff -up dhcp-3.1.0/omapip/hash.c.warnings dhcp-3.1.0/omapip/hash.c
--- dhcp-3.1.0/omapip/hash.c.warnings 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/omapip/hash.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/hash.c 2007-10-23 14:33:17.000000000 -0400
@@ -103,8 +103,6 @@ void free_hash_table (tp, file, line)
const char *file;
int line;
@ -438,7 +438,7 @@ diff -up dhcp-3.1.0/omapip/hash.c.warnings dhcp-3.1.0/omapip/hash.c
return retbuf;
diff -up dhcp-3.1.0/omapip/mrtrace.c.warnings dhcp-3.1.0/omapip/mrtrace.c
--- dhcp-3.1.0/omapip/mrtrace.c.warnings 2005-03-17 15:15:22.000000000 -0500
+++ dhcp-3.1.0/omapip/mrtrace.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/mrtrace.c 2007-10-23 14:33:17.000000000 -0400
@@ -85,7 +85,6 @@ void trace_mr_statp_setup (res_state sta
unsigned buflen = 0;
char *buf = (char *)0;
@ -456,8 +456,8 @@ diff -up dhcp-3.1.0/omapip/mrtrace.c.warnings dhcp-3.1.0/omapip/mrtrace.c
if (status != ISC_R_SUCCESS) {
log_error ("trace_mr_statp: no statp packet found.");
diff -up dhcp-3.1.0/omapip/errwarn.c.warnings dhcp-3.1.0/omapip/errwarn.c
--- dhcp-3.1.0/omapip/errwarn.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/errwarn.c 2007-10-23 10:10:23.000000000 -0400
--- dhcp-3.1.0/omapip/errwarn.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/omapip/errwarn.c 2007-10-23 14:33:17.000000000 -0400
@@ -65,7 +65,7 @@ void log_fatal (const char * fmt, ... )
va_list list;
@ -548,7 +548,7 @@ diff -up dhcp-3.1.0/omapip/errwarn.c.warnings dhcp-3.1.0/omapip/errwarn.c
return 0;
diff -up dhcp-3.1.0/omapip/array.c.warnings dhcp-3.1.0/omapip/array.c
--- dhcp-3.1.0/omapip/array.c.warnings 2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/array.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/array.c 2007-10-23 14:33:17.000000000 -0400
@@ -46,7 +46,6 @@ isc_result_t omapi_array_allocate (omapi
omapi_array_deref_t deref,
const char *file, int line)
@ -567,7 +567,7 @@ diff -up dhcp-3.1.0/omapip/array.c.warnings dhcp-3.1.0/omapip/array.c
diff -up dhcp-3.1.0/omapip/generic.c.warnings dhcp-3.1.0/omapip/generic.c
--- dhcp-3.1.0/omapip/generic.c.warnings 2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/generic.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/generic.c 2007-10-23 14:33:17.000000000 -0400
@@ -292,7 +292,6 @@ isc_result_t omapi_generic_stuff_values
isc_result_t omapi_generic_clear_flags (omapi_object_t *o)
{
@ -578,7 +578,7 @@ diff -up dhcp-3.1.0/omapip/generic.c.warnings dhcp-3.1.0/omapip/generic.c
if (o -> type != omapi_type_generic)
diff -up dhcp-3.1.0/omapip/convert.c.warnings dhcp-3.1.0/omapip/convert.c
--- dhcp-3.1.0/omapip/convert.c.warnings 2005-03-17 15:15:21.000000000 -0500
+++ dhcp-3.1.0/omapip/convert.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/omapip/convert.c 2007-10-23 14:33:17.000000000 -0400
@@ -165,7 +165,7 @@ int binary_to_ascii (outbuf, inbuf, base
u_int32_t number;
static char h2a [] = "0123456789abcdef";
@ -589,8 +589,8 @@ diff -up dhcp-3.1.0/omapip/convert.c.warnings dhcp-3.1.0/omapip/convert.c
if (base > 16)
return 0;
diff -up dhcp-3.1.0/server/dhcp.c.warnings dhcp-3.1.0/server/dhcp.c
--- dhcp-3.1.0/server/dhcp.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/dhcp.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/server/dhcp.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/server/dhcp.c 2007-10-23 14:33:17.000000000 -0400
@@ -265,7 +265,7 @@ void dhcpdiscover (packet, ms_nulltp)
if (lease && lease -> client_hostname) {
@ -720,8 +720,8 @@ diff -up dhcp-3.1.0/server/dhcp.c.warnings dhcp-3.1.0/server/dhcp.c
option_code_hash_lookup(&oc->option,
dhcp_universe.code_hash,
diff -up dhcp-3.1.0/server/dhcpd.c.warnings dhcp-3.1.0/server/dhcpd.c
--- dhcp-3.1.0/server/dhcpd.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/dhcpd.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/server/dhcpd.c.warnings 2007-10-23 14:33:16.000000000 -0400
+++ dhcp-3.1.0/server/dhcpd.c 2007-10-23 14:33:17.000000000 -0400
@@ -200,7 +200,7 @@ int main (argc, argv, envp)
int fd;
int i, status;
@ -771,7 +771,7 @@ diff -up dhcp-3.1.0/server/dhcpd.c.warnings dhcp-3.1.0/server/dhcpd.c
log_fatal ("No memory for shared subnet: %s",
diff -up dhcp-3.1.0/server/omapi.c.warnings dhcp-3.1.0/server/omapi.c
--- dhcp-3.1.0/server/omapi.c.warnings 2007-05-23 19:30:33.000000000 -0400
+++ dhcp-3.1.0/server/omapi.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/omapi.c 2007-10-23 14:33:17.000000000 -0400
@@ -212,7 +212,6 @@ isc_result_t dhcp_lease_set_value (omap
{
struct lease *lease;
@ -879,7 +879,7 @@ diff -up dhcp-3.1.0/server/omapi.c.warnings dhcp-3.1.0/server/omapi.c
diff -up dhcp-3.1.0/server/ddns.c.warnings dhcp-3.1.0/server/ddns.c
--- dhcp-3.1.0/server/ddns.c.warnings 2007-04-27 18:48:10.000000000 -0400
+++ dhcp-3.1.0/server/ddns.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/ddns.c 2007-10-23 14:33:17.000000000 -0400
@@ -224,7 +224,6 @@ int ddns_updates (struct packet *packet,
struct data_string ddns_fwd_name;
struct data_string ddns_rev_name;
@ -898,7 +898,7 @@ diff -up dhcp-3.1.0/server/ddns.c.warnings dhcp-3.1.0/server/ddns.c
diff -up dhcp-3.1.0/server/db.c.warnings dhcp-3.1.0/server/db.c
--- dhcp-3.1.0/server/db.c.warnings 2007-06-06 19:17:51.000000000 -0400
+++ dhcp-3.1.0/server/db.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/db.c 2007-10-23 14:33:17.000000000 -0400
@@ -54,7 +54,6 @@ int write_lease (lease)
struct lease *lease;
{
@ -976,8 +976,8 @@ diff -up dhcp-3.1.0/server/db.c.warnings dhcp-3.1.0/server/db.c
if (lease_file_is_corrupt)
if (!new_lease_file ())
diff -up dhcp-3.1.0/server/confpars.c.warnings dhcp-3.1.0/server/confpars.c
--- dhcp-3.1.0/server/confpars.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/confpars.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/server/confpars.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/server/confpars.c 2007-10-23 14:33:17.000000000 -0400
@@ -39,7 +39,6 @@ static char copyright[] =
#include "dhcpd.h"
@ -1063,7 +1063,7 @@ diff -up dhcp-3.1.0/server/confpars.c.warnings dhcp-3.1.0/server/confpars.c
diff -up dhcp-3.1.0/server/failover.c.warnings dhcp-3.1.0/server/failover.c
--- dhcp-3.1.0/server/failover.c.warnings 2007-06-01 18:26:58.000000000 -0400
+++ dhcp-3.1.0/server/failover.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/failover.c 2007-10-23 14:33:17.000000000 -0400
@@ -64,7 +64,6 @@ void dhcp_failover_startup ()
{
dhcp_failover_state_t *state;
@ -1209,8 +1209,8 @@ diff -up dhcp-3.1.0/server/failover.c.warnings dhcp-3.1.0/server/failover.c
#define FREE_LEASES 0
#define ACTIVE_LEASES 1
diff -up dhcp-3.1.0/server/mdb.c.warnings dhcp-3.1.0/server/mdb.c
--- dhcp-3.1.0/server/mdb.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/server/mdb.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/server/mdb.c.warnings 2007-10-23 14:33:16.000000000 -0400
+++ dhcp-3.1.0/server/mdb.c 2007-10-23 14:33:17.000000000 -0400
@@ -317,7 +317,6 @@ isc_result_t delete_host (hd, commit)
struct host_decl *hp = (struct host_decl *)0;
struct host_decl *np = (struct host_decl *)0;
@ -1282,8 +1282,8 @@ diff -up dhcp-3.1.0/server/mdb.c.warnings dhcp-3.1.0/server/mdb.c
struct lease *l;
struct lease **lptr[RESERVED_LEASES+1];
diff -up dhcp-3.1.0/dst/dst_api.c.warnings dhcp-3.1.0/dst/dst_api.c
--- dhcp-3.1.0/dst/dst_api.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dst/dst_api.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/dst/dst_api.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/dst/dst_api.c 2007-10-23 14:33:17.000000000 -0400
@@ -475,7 +475,7 @@ dst_s_read_public_key(const char *in_nam
int proto, alg, dlen;
int c;
@ -1305,7 +1305,7 @@ diff -up dhcp-3.1.0/dst/dst_api.c.warnings dhcp-3.1.0/dst/dst_api.c
while ((c = getc(fp)) != EOF)
diff -up dhcp-3.1.0/dst/prandom.c.warnings dhcp-3.1.0/dst/prandom.c
--- dhcp-3.1.0/dst/prandom.c.warnings 2001-02-22 02:22:09.000000000 -0500
+++ dhcp-3.1.0/dst/prandom.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/dst/prandom.c 2007-10-23 14:33:17.000000000 -0400
@@ -335,7 +335,7 @@ unix_cmd(dst_work *work)
cnt += do_time(work);
}
@ -1316,8 +1316,8 @@ diff -up dhcp-3.1.0/dst/prandom.c.warnings dhcp-3.1.0/dst/prandom.c
return (cnt); /* read how many bytes where read in */
}
diff -up dhcp-3.1.0/common/conflex.c.warnings dhcp-3.1.0/common/conflex.c
--- dhcp-3.1.0/common/conflex.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/conflex.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/conflex.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/conflex.c 2007-10-23 14:33:17.000000000 -0400
@@ -518,13 +518,15 @@ static enum dhcp_token read_num_or_name
cfile -> tokbuf [i] = 0;
cfile -> tlen = i;
@ -1339,7 +1339,7 @@ diff -up dhcp-3.1.0/common/conflex.c.warnings dhcp-3.1.0/common/conflex.c
diff -up dhcp-3.1.0/common/socket.c.warnings dhcp-3.1.0/common/socket.c
--- dhcp-3.1.0/common/socket.c.warnings 2006-07-25 13:41:18.000000000 -0400
+++ dhcp-3.1.0/common/socket.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/socket.c 2007-10-23 14:33:17.000000000 -0400
@@ -55,8 +55,6 @@ static char copyright[] =
# endif
#endif
@ -1351,7 +1351,7 @@ diff -up dhcp-3.1.0/common/socket.c.warnings dhcp-3.1.0/common/socket.c
diff -up dhcp-3.1.0/common/parse.c.warnings dhcp-3.1.0/common/parse.c
--- dhcp-3.1.0/common/parse.c.warnings 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/common/parse.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/parse.c 2007-10-23 14:33:17.000000000 -0400
@@ -311,9 +311,6 @@ int parse_ip_addr (cfile, addr)
struct parse *cfile;
struct iaddr *addr;
@ -1508,8 +1508,8 @@ diff -up dhcp-3.1.0/common/parse.c.warnings dhcp-3.1.0/common/parse.c
cfile -> warnings_occurred = 1;
diff -up dhcp-3.1.0/common/alloc.c.warnings dhcp-3.1.0/common/alloc.c
--- dhcp-3.1.0/common/alloc.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/alloc.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/alloc.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/alloc.c 2007-10-23 14:33:17.000000000 -0400
@@ -48,7 +48,6 @@ int option_chain_head_allocate (ptr, fil
const char *file;
int line;
@ -1577,8 +1577,8 @@ diff -up dhcp-3.1.0/common/alloc.c.warnings dhcp-3.1.0/common/alloc.c
if (!ptr) {
diff -up dhcp-3.1.0/common/lpf.c.warnings dhcp-3.1.0/common/lpf.c
--- dhcp-3.1.0/common/lpf.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/lpf.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/lpf.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/lpf.c 2007-10-23 14:33:17.000000000 -0400
@@ -84,8 +84,6 @@ int if_register_lpf (info)
struct interface_info *info;
{
@ -1598,7 +1598,7 @@ diff -up dhcp-3.1.0/common/lpf.c.warnings dhcp-3.1.0/common/lpf.c
int nocsum = 0;
diff -up dhcp-3.1.0/common/memory.c.warnings dhcp-3.1.0/common/memory.c
--- dhcp-3.1.0/common/memory.c.warnings 2006-06-01 16:23:17.000000000 -0400
+++ dhcp-3.1.0/common/memory.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/memory.c 2007-10-23 14:33:17.000000000 -0400
@@ -84,8 +84,7 @@ isc_result_t delete_group (struct group_
isc_result_t supersede_group (struct group_object *group, int writep)
@ -1619,7 +1619,7 @@ diff -up dhcp-3.1.0/common/memory.c.warnings dhcp-3.1.0/common/memory.c
/* Normally gp should contain the null pointer, but for convenience
diff -up dhcp-3.1.0/common/comapi.c.warnings dhcp-3.1.0/common/comapi.c
--- dhcp-3.1.0/common/comapi.c.warnings 2006-02-24 18:16:28.000000000 -0500
+++ dhcp-3.1.0/common/comapi.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/comapi.c 2007-10-23 14:33:17.000000000 -0400
@@ -143,7 +143,6 @@ isc_result_t dhcp_group_set_value (omap
{
struct group_object *group;
@ -1754,7 +1754,7 @@ diff -up dhcp-3.1.0/common/comapi.c.warnings dhcp-3.1.0/common/comapi.c
/* If we get to here without finding a shared_network, no valid key was
diff -up dhcp-3.1.0/common/icmp.c.warnings dhcp-3.1.0/common/icmp.c
--- dhcp-3.1.0/common/icmp.c.warnings 2005-03-17 15:14:58.000000000 -0500
+++ dhcp-3.1.0/common/icmp.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/icmp.c 2007-10-23 14:33:17.000000000 -0400
@@ -61,11 +61,7 @@ void icmp_startup (routep, handler)
{
struct protoent *proto;
@ -1777,7 +1777,7 @@ diff -up dhcp-3.1.0/common/icmp.c.warnings dhcp-3.1.0/common/icmp.c
ia->len = ntohl(ia->len);
diff -up dhcp-3.1.0/common/inet.c.warnings dhcp-3.1.0/common/inet.c
--- dhcp-3.1.0/common/inet.c.warnings 2006-05-15 11:07:49.000000000 -0400
+++ dhcp-3.1.0/common/inet.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/inet.c 2007-10-23 14:33:17.000000000 -0400
@@ -124,7 +124,7 @@ struct iaddr broadcast_addr (subnet, mas
struct iaddr subnet;
struct iaddr mask;
@ -1789,7 +1789,7 @@ diff -up dhcp-3.1.0/common/inet.c.warnings dhcp-3.1.0/common/inet.c
if (subnet.len > sizeof(subnet.iabuf))
diff -up dhcp-3.1.0/common/dns.c.warnings dhcp-3.1.0/common/dns.c
--- dhcp-3.1.0/common/dns.c.warnings 2006-07-19 13:14:55.000000000 -0400
+++ dhcp-3.1.0/common/dns.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/dns.c 2007-10-23 14:33:17.000000000 -0400
@@ -127,7 +127,6 @@ dns_zone_hash_t *dns_zone_hash;
isc_result_t find_tsig_key (ns_tsig_key **key, const char *zname,
struct dns_zone *zone)
@ -1834,8 +1834,8 @@ diff -up dhcp-3.1.0/common/dns.c.warnings dhcp-3.1.0/common/dns.c
if (!updrec) {
diff -up dhcp-3.1.0/common/tree.c.warnings dhcp-3.1.0/common/tree.c
--- dhcp-3.1.0/common/tree.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/tree.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/tree.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/tree.c 2007-10-23 14:33:17.000000000 -0400
@@ -51,61 +51,6 @@ struct __res_state resolver_state;
int resolver_inited = 0;
#endif
@ -1966,8 +1966,8 @@ diff -up dhcp-3.1.0/common/tree.c.warnings dhcp-3.1.0/common/tree.c
if (!ptr || !*ptr) {
diff -up dhcp-3.1.0/common/print.c.warnings dhcp-3.1.0/common/print.c
--- dhcp-3.1.0/common/print.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/print.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/print.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/print.c 2007-10-23 14:33:17.000000000 -0400
@@ -47,7 +47,7 @@ char *quotify_string (const char *s, con
const unsigned char *sp;
char *buf, *nsp;
@ -2011,8 +2011,8 @@ diff -up dhcp-3.1.0/common/print.c.warnings dhcp-3.1.0/common/print.c
/* See if this is just ASCII. */
diff -up dhcp-3.1.0/common/discover.c.warnings dhcp-3.1.0/common/discover.c
--- dhcp-3.1.0/common/discover.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/discover.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/discover.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/discover.c 2007-10-23 14:33:17.000000000 -0400
@@ -128,16 +128,14 @@ int have_setup_fallback = 0;
void discover_interfaces (state)
int state;
@ -2065,8 +2065,8 @@ diff -up dhcp-3.1.0/common/discover.c.warnings dhcp-3.1.0/common/discover.c
if (h -> type != dhcp_type_interface)
diff -up dhcp-3.1.0/common/options.c.warnings dhcp-3.1.0/common/options.c
--- dhcp-3.1.0/common/options.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/options.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/common/options.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/options.c 2007-10-23 14:50:34.000000000 -0400
@@ -43,9 +43,6 @@ static char copyright[] =
struct option *vendor_cfg_option;
@ -2145,6 +2145,15 @@ diff -up dhcp-3.1.0/common/options.c.warnings dhcp-3.1.0/common/options.c
p = format;
while (*p != '\0') {
@@ -2161,7 +2148,7 @@ store_option(struct data_string *result,
"refers to unknown "
"option space '%.*s'.",
oc->option->code,
- end - start, start);
+ (int) (end - start), start);
break;
}
@@ -2198,12 +2185,10 @@ int option_space_encapsulate (result, pa
struct binding_scope **scope;
struct data_string *name;
@ -2232,7 +2241,7 @@ diff -up dhcp-3.1.0/common/options.c.warnings dhcp-3.1.0/common/options.c
}
diff -up dhcp-3.1.0/common/execute.c.warnings dhcp-3.1.0/common/execute.c
--- dhcp-3.1.0/common/execute.c.warnings 2007-05-11 11:51:07.000000000 -0400
+++ dhcp-3.1.0/common/execute.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/execute.c 2007-10-23 14:33:17.000000000 -0400
@@ -54,8 +54,6 @@ int execute_statements (result, packet,
struct executable_statement *r, *e, *next;
int rc;
@ -2289,7 +2298,7 @@ diff -up dhcp-3.1.0/common/execute.c.warnings dhcp-3.1.0/common/execute.c
if ((*callback) (foo, vp, condp) != 0)
diff -up dhcp-3.1.0/common/resolv.c.warnings dhcp-3.1.0/common/resolv.c
--- dhcp-3.1.0/common/resolv.c.warnings 2006-02-24 18:16:28.000000000 -0500
+++ dhcp-3.1.0/common/resolv.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/common/resolv.c 2007-10-23 14:33:17.000000000 -0400
@@ -50,10 +50,8 @@ void read_resolv_conf (parse_time)
struct parse *cfile;
const char *val;
@ -2319,8 +2328,8 @@ diff -up dhcp-3.1.0/common/resolv.c.warnings dhcp-3.1.0/common/resolv.c
read_resolv_conf (rcdate);
diff -up dhcp-3.1.0/minires/res_init.c.warnings dhcp-3.1.0/minires/res_init.c
--- dhcp-3.1.0/minires/res_init.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/minires/res_init.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/minires/res_init.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/minires/res_init.c 2007-10-23 14:33:17.000000000 -0400
@@ -155,7 +155,7 @@ res_ninit(res_state statp) {
int
minires_vinit(res_state statp, int preinit) {
@ -2332,7 +2341,7 @@ diff -up dhcp-3.1.0/minires/res_init.c.warnings dhcp-3.1.0/minires/res_init.c
char buf[BUFSIZ];
diff -up dhcp-3.1.0/minires/res_query.c.warnings dhcp-3.1.0/minires/res_query.c
--- dhcp-3.1.0/minires/res_query.c.warnings 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/minires/res_query.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/minires/res_query.c 2007-10-23 14:33:17.000000000 -0400
@@ -384,7 +384,7 @@ res_nquerydomain(res_state statp,
const char *
res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {
@ -2344,7 +2353,7 @@ diff -up dhcp-3.1.0/minires/res_query.c.warnings dhcp-3.1.0/minires/res_query.c
diff -up dhcp-3.1.0/minires/res_update.c.warnings dhcp-3.1.0/minires/res_update.c
--- dhcp-3.1.0/minires/res_update.c.warnings 2005-03-17 15:15:20.000000000 -0500
+++ dhcp-3.1.0/minires/res_update.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/minires/res_update.c 2007-10-23 14:33:17.000000000 -0400
@@ -88,7 +88,7 @@ res_nupdate(res_state statp, ns_updrec *
double answer[PACKETSZ / sizeof (double)];
double packet[2*PACKETSZ / sizeof (double)];
@ -2356,7 +2365,7 @@ diff -up dhcp-3.1.0/minires/res_update.c.warnings dhcp-3.1.0/minires/res_update.
struct sockaddr_in nsaddrs[MAXNS];
diff -up dhcp-3.1.0/minires/ns_date.c.warnings dhcp-3.1.0/minires/ns_date.c
--- dhcp-3.1.0/minires/ns_date.c.warnings 2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/minires/ns_date.c 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/minires/ns_date.c 2007-10-23 14:33:17.000000000 -0400
@@ -48,7 +48,7 @@ static const char rcsid[] = "$Id: ns_dat
/* Forward. */
@ -2376,8 +2385,8 @@ diff -up dhcp-3.1.0/minires/ns_date.c.warnings dhcp-3.1.0/minires/ns_date.c
int i;
diff -up dhcp-3.1.0/minires/res_mkupdate.c.warnings dhcp-3.1.0/minires/res_mkupdate.c
--- dhcp-3.1.0/minires/res_mkupdate.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/minires/res_mkupdate.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/minires/res_mkupdate.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/minires/res_mkupdate.c 2007-10-23 14:33:17.000000000 -0400
@@ -112,7 +112,7 @@ res_nmkupdate(res_state statp,
u_int16_t rtype, rclass;
u_int32_t n1, rttl;
@ -2388,8 +2397,8 @@ diff -up dhcp-3.1.0/minires/res_mkupdate.c.warnings dhcp-3.1.0/minires/res_mkupd
unsigned buflen = *blp;
u_char *buf = (unsigned char *)bp;
diff -up dhcp-3.1.0/client/clparse.c.warnings dhcp-3.1.0/client/clparse.c
--- dhcp-3.1.0/client/clparse.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/client/clparse.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/client/clparse.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/client/clparse.c 2007-10-23 14:33:17.000000000 -0400
@@ -39,8 +39,6 @@ static char copyright[] =
#include "dhcpd.h"
@ -2446,8 +2455,8 @@ diff -up dhcp-3.1.0/client/clparse.c.warnings dhcp-3.1.0/client/clparse.c
skip_to_semi (cfile);
return 0;
diff -up dhcp-3.1.0/client/dhclient.c.warnings dhcp-3.1.0/client/dhclient.c
--- dhcp-3.1.0/client/dhclient.c.warnings 2007-10-23 10:09:16.000000000 -0400
+++ dhcp-3.1.0/client/dhclient.c 2007-10-23 10:09:16.000000000 -0400
--- dhcp-3.1.0/client/dhclient.c.warnings 2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/client/dhclient.c 2007-10-23 14:33:17.000000000 -0400
@@ -126,7 +126,9 @@ int main (argc, argv, envp)
#ifdef LIBDHCP
libdhcp_control = libdhcp_ctl;

View File

@ -1,30 +1,18 @@
diff -up dhcp-3.0.6/includes/dhcpd.h.xen dhcp-3.0.6/includes/dhcpd.h
--- dhcp-3.0.6/includes/dhcpd.h.xen 2007-07-10 11:50:22.000000000 -0400
+++ dhcp-3.0.6/includes/dhcpd.h 2007-07-10 14:03:52.000000000 -0400
@@ -1985,7 +1985,7 @@ ssize_t decode_hw_header PROTO ((struct
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,
- unsigned, unsigned *));
+ unsigned, unsigned *, int));
diff -up dhcp-3.1.0/common/nit.c.xen dhcp-3.1.0/common/nit.c
--- dhcp-3.1.0/common/nit.c.xen 2007-05-23 19:30:32.000000000 -0400
+++ dhcp-3.1.0/common/nit.c 2007-10-22 16:12:27.000000000 -0400
@@ -371,7 +371,7 @@ ssize_t receive_packet (interface, buf,
/* ethernet.c */
void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,
diff -up dhcp-3.0.6/common/bpf.c.xen dhcp-3.0.6/common/bpf.c
--- dhcp-3.0.6/common/bpf.c.xen 2007-05-01 16:42:55.000000000 -0400
+++ dhcp-3.0.6/common/bpf.c 2007-07-10 14:04:24.000000000 -0400
@@ -478,7 +478,7 @@ ssize_t receive_packet (interface, buf,
offset = decode_udp_ip_header (interface,
interface -> rbuf,
interface -> rbuf_offset,
- from, hdr.bh_caplen, &paylen);
+ from, hdr.bh_caplen, &paylen, 0);
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff -up dhcp-3.0.6/common/dlpi.c.xen dhcp-3.0.6/common/dlpi.c
--- dhcp-3.0.6/common/dlpi.c.xen 2007-05-01 16:42:55.000000000 -0400
+++ dhcp-3.0.6/common/dlpi.c 2007-07-10 14:04:36.000000000 -0400
if (offset < 0)
diff -up dhcp-3.1.0/common/dlpi.c.xen dhcp-3.1.0/common/dlpi.c
--- dhcp-3.1.0/common/dlpi.c.xen 2007-05-23 19:30:32.000000000 -0400
+++ dhcp-3.1.0/common/dlpi.c 2007-10-22 16:12:11.000000000 -0400
@@ -680,7 +680,7 @@ ssize_t receive_packet (interface, buf,
length -= offset;
#endif
@ -34,9 +22,21 @@ diff -up dhcp-3.0.6/common/dlpi.c.xen dhcp-3.0.6/common/dlpi.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
--- dhcp-3.0.6/common/lpf.c.xen 2007-07-10 11:50:22.000000000 -0400
+++ dhcp-3.0.6/common/lpf.c 2007-07-10 14:09:29.000000000 -0400
diff -up dhcp-3.1.0/common/upf.c.xen dhcp-3.1.0/common/upf.c
--- dhcp-3.1.0/common/upf.c.xen 2007-05-23 19:30:32.000000000 -0400
+++ dhcp-3.1.0/common/upf.c 2007-10-22 16:12:52.000000000 -0400
@@ -322,7 +322,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-3.1.0/common/lpf.c.xen dhcp-3.1.0/common/lpf.c
--- dhcp-3.1.0/common/lpf.c.xen 2007-10-22 16:11:12.000000000 -0400
+++ dhcp-3.1.0/common/lpf.c 2007-10-22 16:15:24.000000000 -0400
@@ -34,16 +34,31 @@ static char copyright[] =
#include "dhcpd.h"
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
@ -69,10 +69,10 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
/* Reinitializes the specified interface after an address change. This
is not required for packet-filter APIs. */
@@ -69,10 +84,14 @@ int if_register_lpf (info)
struct interface_info *info;
{
@@ -71,10 +86,14 @@ int if_register_lpf (info)
int sock;
char filename[50];
int b;
- struct sockaddr sa;
+ union {
+ struct sockaddr_ll ll;
@ -86,7 +86,7 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
htons((short)ETH_P_ALL))) < 0) {
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
@@ -87,11 +106,16 @@ int if_register_lpf (info)
@@ -89,11 +108,16 @@ int if_register_lpf (info)
log_fatal ("Open a socket for LPF: %m");
}
@ -106,7 +106,7 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
errno == EAFNOSUPPORT || errno == EINVAL) {
@@ -171,9 +195,18 @@ static void lpf_gen_filter_setup (struct
@@ -173,9 +197,18 @@ static void lpf_gen_filter_setup (struct
void if_register_receive (info)
struct interface_info *info;
{
@ -125,7 +125,7 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
#if defined (HAVE_TR_SUPPORT)
if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
lpf_tr_filter_setup (info);
@@ -292,7 +325,6 @@ ssize_t send_packet (interface, packet,
@@ -294,7 +327,6 @@ ssize_t send_packet (interface, packet,
double hh [16];
double ih [1536 / sizeof (double)];
unsigned char *buf = (unsigned char *)ih;
@ -133,7 +133,7 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
int result;
int fudge;
@@ -310,15 +342,7 @@ ssize_t send_packet (interface, packet,
@@ -312,15 +344,7 @@ ssize_t send_packet (interface, packet,
(unsigned char *)raw, len);
memcpy (buf + ibufp, raw, len);
@ -150,8 +150,8 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
if (result < 0)
log_error ("send_packet: %m");
return result;
@@ -335,14 +359,35 @@ ssize_t receive_packet (interface, buf,
{
@@ -338,14 +362,35 @@ ssize_t receive_packet (interface, buf,
int nread;
int length = 0;
int offset = 0;
+ int nocsum = 0;
@ -187,7 +187,7 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
bufix = 0;
/* Decode the physical header... */
offset = decode_hw_header (interface, ibuf, bufix, hfrom);
@@ -359,7 +404,7 @@ ssize_t receive_packet (interface, buf,
@@ -362,7 +407,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
@ -196,21 +196,21 @@ diff -up dhcp-3.0.6/common/lpf.c.xen dhcp-3.0.6/common/lpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-3.0.6/common/nit.c.xen dhcp-3.0.6/common/nit.c
--- dhcp-3.0.6/common/nit.c.xen 2007-05-01 16:42:55.000000000 -0400
+++ dhcp-3.0.6/common/nit.c 2007-07-10 14:05:16.000000000 -0400
@@ -371,7 +371,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
diff -up dhcp-3.1.0/common/bpf.c.xen dhcp-3.1.0/common/bpf.c
--- dhcp-3.1.0/common/bpf.c.xen 2007-05-23 19:30:32.000000000 -0400
+++ dhcp-3.1.0/common/bpf.c 2007-10-22 16:13:14.000000000 -0400
@@ -478,7 +478,7 @@ ssize_t receive_packet (interface, buf,
offset = decode_udp_ip_header (interface,
interface -> rbuf,
interface -> rbuf_offset,
- from, hdr.bh_caplen, &paylen);
+ from, hdr.bh_caplen, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-3.0.6/common/packet.c.xen dhcp-3.0.6/common/packet.c
--- dhcp-3.0.6/common/packet.c.xen 2007-07-10 11:50:22.000000000 -0400
+++ dhcp-3.0.6/common/packet.c 2007-07-10 14:06:24.000000000 -0400
if (offset < 0) {
diff -up dhcp-3.1.0/common/packet.c.xen dhcp-3.1.0/common/packet.c
--- dhcp-3.1.0/common/packet.c.xen 2007-10-22 16:11:12.000000000 -0400
+++ dhcp-3.1.0/common/packet.c 2007-10-22 16:12:41.000000000 -0400
@@ -215,7 +215,7 @@ ssize_t
decode_udp_ip_header(struct interface_info *interface,
unsigned char *buf, unsigned bufix,
@ -229,15 +229,15 @@ diff -up dhcp-3.0.6/common/packet.c.xen dhcp-3.0.6/common/packet.c
udp_packets_bad_checksum++;
if (udp_packets_seen > 4 &&
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
diff -up dhcp-3.0.6/common/upf.c.xen dhcp-3.0.6/common/upf.c
--- dhcp-3.0.6/common/upf.c.xen 2007-05-01 16:42:56.000000000 -0400
+++ dhcp-3.0.6/common/upf.c 2007-07-10 14:06:37.000000000 -0400
@@ -322,7 +322,7 @@ ssize_t receive_packet (interface, buf,
diff -up dhcp-3.1.0/includes/dhcpd.h.xen dhcp-3.1.0/includes/dhcpd.h
--- dhcp-3.1.0/includes/dhcpd.h.xen 2007-10-22 16:11:12.000000000 -0400
+++ dhcp-3.1.0/includes/dhcpd.h 2007-10-22 16:13:01.000000000 -0400
@@ -2140,7 +2140,7 @@ ssize_t decode_hw_header PROTO ((struct
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,
- unsigned, unsigned *));
+ unsigned, unsigned *, int));
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
/* ethernet.c */
void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,

344
dhcp.schema Normal file
View File

@ -0,0 +1,344 @@
attributetype ( 2.16.840.1.113719.1.203.4.1
NAME 'dhcpPrimaryDN'
EQUALITY distinguishedNameMatch
DESC 'The DN of the dhcpServer which is the primary server for the configuration.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.2
NAME 'dhcpSecondaryDN'
EQUALITY distinguishedNameMatch
DESC 'The DN of dhcpServer(s) which provide backup service for the configuration.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.3
NAME 'dhcpStatements'
EQUALITY caseIgnoreIA5Match
DESC 'Flexible storage for specific data depending on what object this exists in. Like conditional statements, server parameters, etc. This allows the standard to evolve without needing to adjust the schema.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 2.16.840.1.113719.1.203.4.4
NAME 'dhcpRange'
EQUALITY caseIgnoreIA5Match
DESC 'The starting & ending IP Addresses in the range (inclusive), separated by a hyphen; if the range only contains one address, then just the address can be specified with no hyphen. Each range is defined as a separate value.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 2.16.840.1.113719.1.203.4.5
NAME 'dhcpPermitList'
EQUALITY caseIgnoreIA5Match
DESC 'This attribute contains the permit lists associated with a pool. Each permit list is defined as a separate value.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 2.16.840.1.113719.1.203.4.6
NAME 'dhcpNetMask'
EQUALITY integerMatch
DESC 'The subnet mask length for the subnet. The mask can be easily computed from this length.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.7
NAME 'dhcpOption'
EQUALITY caseIgnoreIA5Match
DESC 'Encoded option values to be sent to clients. Each value represents a single option and contains (OptionTag, Length, OptionValue) encoded in the format used by DHCP.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 2.16.840.1.113719.1.203.4.8
NAME 'dhcpClassData'
EQUALITY caseIgnoreIA5Match
DESC 'Encoded text string or list of bytes expressed in hexadecimal, separated by colons. Clients match subclasses based on matching the class data with the results of match or spawn with statements in the class name declarations.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.9
NAME 'dhcpOptionsDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of the dhcpOption objects containing the configuration options provided by the server.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.10
NAME 'dhcpHostDN'
EQUALITY distinguishedNameMatch
DESC 'the distinguished name(s) of the dhcpHost objects.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.11
NAME 'dhcpPoolDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of pools.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.12
NAME 'dhcpGroupDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of the groups.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.13
NAME 'dhcpSubnetDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of the subnets.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.14
NAME 'dhcpLeaseDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name of a client address.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE)
attributetype ( 2.16.840.1.113719.1.203.4.15 NAME 'dhcpLeasesDN'
DESC 'The distinguished name(s) client addresses.'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.16
NAME 'dhcpClassesDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of a class(es) in a subclass.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.17
NAME 'dhcpSubclassesDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of subclass(es).'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.18
NAME 'dhcpSharedNetworkDN'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name(s) of sharedNetworks.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.19
NAME 'dhcpServiceDN'
EQUALITY distinguishedNameMatch
DESC 'The DN of dhcpService object(s)which contain the configuration information. Each dhcpServer object has this attribute identifying the DHCP configuration(s) that the server is associated with.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 2.16.840.1.113719.1.203.4.20
NAME 'dhcpVersion' DESC 'The version attribute of this object.'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.21
NAME 'dhcpImplementation'
EQUALITY caseIgnoreIA5Match
DESC 'Description of the DHCP Server implementation e.g. DHCP Servers vendor.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.22
NAME 'dhcpAddressState'
EQUALITY caseIgnoreIA5Match
DESC 'This stores information about the current binding-status of an address. For dynamic addresses managed by DHCP, the values should be restricted to the following: "FREE", "ACTIVE", "EXPIRED", "RELEASED", "RESET", "ABANDONED", "BACKUP". For other addresses, it SHOULD be one of the following: "UNKNOWN", "RESERVED" (an address that is managed by DHCP that is reserved for a specific client), "RESERVED-ACTIVE" (same as reserved, but address is currently in use), "ASSIGNED" (assigned manually or by some other mechanism), "UNASSIGNED", "NOTASSIGNABLE".'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.23
NAME 'dhcpExpirationTime'
EQUALITY integerMatch
DESC 'This is the time the current lease for an address expires.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.24
NAME 'dhcpStartTimeOfState'
EQUALITY integerMatch
DESC 'This is the time of the last state change for a leased address.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.25
NAME 'dhcpLastTransactionTime'
EQUALITY integerMatch
DESC 'This is the last time a valid DHCP packet was received from the client.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.26
NAME 'dhcpBootpFlag'
EQUALITY integerMatch
DESC 'This indicates whether the address was assigned via BOOTP.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.27
NAME 'dhcpDomainName'
EQUALITY caseIgnoreIA5Match
DESC 'This is the name of the domain sent to the client by the server. It is essentially the same as the value for DHCP option 15 sent to the client, and represents only the domain - not the full FQDN. To obtain the full FQDN assigned to the client you must prepend the "dhcpAssignedHostName" to this value with a ".".'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.28
NAME 'dhcpDnsStatus'
EQUALITY integerMatch
DESC 'This indicates the status of updating DNS resource records on behalf of the client by the DHCP server for this address. The value is a 16-bit bitmask.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.29
NAME 'dhcpRequestedHostName'
EQUALITY caseIgnoreIA5Match
DESC 'This is the hostname that was requested by the client.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.30
NAME 'dhcpAssignedHostName'
EQUALITY caseIgnoreIA5Match
DESC 'This is the actual hostname that was assigned to a client. It may not be the name that was requested by the client. The fully qualified domain name can be determined by appending the value of "dhcpDomainName" (with a dot separator) to this name.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.31
NAME 'dhcpReservedForClient'
EQUALITY distinguishedNameMatch
DESC 'The distinguished name of a "dhcpClient" that an address is reserved for. This may not be the same as the "dhcpAssignedToClient" attribute if the address is being reassigned but the current lease has not yet expired.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.32
NAME 'dhcpAssignedToClient'
EQUALITY distinguishedNameMatch
DESC 'This is the distinguished name of a "dhcpClient" that an address is currently assigned to. This attribute is only present in the class when the address is leased.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.33
NAME 'dhcpRelayAgentInfo'
EQUALITY caseIgnoreIA5Match
DESC 'If the client request was received via a relay agent, this contains information about the relay agent that was available from the DHCP request. This is a hex-encoded option value.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.34
NAME 'dhcpHWAddress'
EQUALITY caseIgnoreIA5Match
DESC 'The clients hardware address that requested this IP address.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.35
NAME 'dhcpHashBucketAssignment'
EQUALITY caseIgnoreIA5Match
DESC 'HashBucketAssignment bit map for the DHCP Server, as defined in DHC Load Balancing Algorithm [RFC 3074].'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.36
NAME 'dhcpDelayedServiceParameter'
EQUALITY integerMatch
DESC 'Delay in seconds corresponding to Delayed Service Parameter configuration, as defined in DHC Load Balancing Algorithm [RFC 3074]. '
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.37
NAME 'dhcpMaxClientLeadTime'
EQUALITY integerMatch
DESC 'Maximum Client Lead Time configuration in seconds, as defined in DHCP Failover Protocol [FAILOVR]'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.38
NAME 'dhcpFailOverEndpointState'
EQUALITY integerMatch
DESC 'Server (Failover Endpoint) state, as defined in DHCP Failover Protocol [FAILOVR]'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 2.16.840.1.113719.1.203.4.39
NAME 'dhcpErrorLog'
EQUALITY caseIgnoreIA5Match
DESC 'Generic error log attribute that allows logging error conditions within a dhcpService or a dhcpSubnet, like no IP addresses available for lease.'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
# Classes
objectclass ( 2.16.840.1.113719.1.203.6.1
NAME 'dhcpService'
DESC 'Service object that represents the actual DHCP Service configuration. This is a container object.'
SUP top
MUST (cn $ dhcpPrimaryDN)
MAY ( dhcpSecondaryDN $ dhcpSharedNetworkDN $ dhcpSubnetDN $
dhcpGroupDN $ dhcpHostDN $ dhcpClassesDN $ dhcpOptionsDN $
dhcpStatements ) )
objectclass ( 2.16.840.1.113719.1.203.6.2
NAME 'dhcpSharedNetwork'
DESC 'This stores configuration information for a shared network.'
SUP top
MUST cn
MAY ( dhcpSubnetDN $ dhcpPoolDN $ dhcpOptionsDN $ dhcpStatements)
X-NDS_CONTAINMENT ('dhcpService' ) )
objectclass ( 2.16.840.1.113719.1.203.6.3
NAME 'dhcpSubnet'
DESC 'This class defines a subnet. This is a container object.'
SUP top
MUST ( cn $ dhcpNetMask )
MAY ( dhcpRange $ dhcpPoolDN $ dhcpGroupDN $ dhcpHostDN $
dhcpClassesDN $ dhcpLeasesDN $ dhcpOptionsDN $ dhcpStatements)
X-NDS_CONTAINMENT ('dhcpService' 'dhcpSharedNetwork') )
objectclass ( 2.16.840.1.113719.1.203.6.4
NAME 'dhcpPool'
DESC 'This stores configuration information about a pool.'
SUP top
MUST ( cn $ dhcpRange )
MAY (dhcpClassesDN $ dhcpPermitList $ dhcpLeasesDN $ dhcpOptionsDN $
dhcpStatements)
X-NDS_CONTAINMENT ('dhcpSubnet' 'dhcpSharedNetwork') )
objectclass ( 2.16.840.1.113719.1.203.6.5
NAME 'dhcpGroup'
DESC 'Group object that lists host DNs and parameters. This is a container object.'
SUP top
MUST cn
MAY ( dhcpHostDN $ dhcpOptionsDN $ dhcpStatements )
X-NDS_CONTAINMENT ('dhcpSubnet' 'dhcpService' ) )
objectclass ( 2.16.840.1.113719.1.203.6.6
NAME 'dhcpHost'
DESC 'This represents information about a particular client'
SUP top
MUST cn
MAY (dhcpLeaseDN $ dhcpHWAddress $ dhcpOptionsDN $ dhcpStatements)
X-NDS_CONTAINMENT ('dhcpService' 'dhcpSubnet' 'dhcpGroup') )
objectclass ( 2.16.840.1.113719.1.203.6.7
NAME 'dhcpClass'
DESC 'Represents information about a collection of related clients.'
SUP top
MUST cn
MAY (dhcpSubClassesDN $ dhcpOptionsDN $ dhcpStatements)
X-NDS_CONTAINMENT ('dhcpService' 'dhcpSubnet' ) )
objectclass ( 2.16.840.1.113719.1.203.6.8
NAME 'dhcpSubClass'
DESC 'Represents information about a collection of related classes.'
SUP top
MUST cn
MAY (dhcpClassData $ dhcpOptionsDN $ dhcpStatements)
X-NDS_CONTAINMENT 'dhcpClass' )
objectclass ( 2.16.840.1.113719.1.203.6.9
NAME 'dhcpOptions'
DESC 'Represents information about a collection of options defined.'
SUP top
AUXILIARY
MUST cn
MAY ( dhcpOption )
X-NDS_CONTAINMENT ('dhcpService' 'dhcpSharedNetwork' 'dhcpSubnet'
'dhcpPool' 'dhcpGroup' 'dhcpHost' 'dhcpClass' ) )
objectclass ( 2.16.840.1.113719.1.203.6.10
NAME 'dhcpLeases'
DESC 'This class represents an IP Address, which may or may not have been leased.'
SUP top
MUST ( cn $ dhcpAddressState )
MAY ( dhcpExpirationTime $ dhcpStartTimeOfState $
dhcpLastTransactionTime $ dhcpBootpFlag $ dhcpDomainName $
dhcpDnsStatus $ dhcpRequestedHostName $ dhcpAssignedHostName $
dhcpReservedForClient $ dhcpAssignedToClient $
dhcpRelayAgentInfo $ dhcpHWAddress )
X-NDS_CONTAINMENT ( 'dhcpService' 'dhcpSubnet' 'dhcpPool') )
objectclass ( 2.16.840.1.113719.1.203.6.11
NAME 'dhcpLog'
DESC 'This is the object that holds past information about the IP address. The cn is the time/date stamp when the address was assigned or released, the address state at the time, if the address was assigned or released.'
SUP top
MUST ( cn )
MAY ( dhcpAddressState $ dhcpExpirationTime $ dhcpStartTimeOfState $
dhcpLastTransactionTime $ dhcpBootpFlag $ dhcpDomainName $
dhcpDnsStatus $ dhcpRequestedHostName $ dhcpAssignedHostName $
dhcpReservedForClient $ dhcpAssignedToClient $
dhcpRelayAgentInfo $ dhcpHWAddress $ dhcpErrorLog)
X-NDS_CONTAINMENT ('dhcpLeases' 'dhcpPool' 'dhcpSubnet'
'dhcpSharedNetwork' 'dhcpService' ) )
objectclass ( 2.16.840.1.113719.1.203.6.12
NAME 'dhcpServer'
DESC 'DHCP Server Object'
SUP top
MUST (cn $ dhcpServiceDN)
MAY (dhcpVersion $ dhcpImplementation $ dhcpHashBucketAssignment $ dhcpDelayedServiceParameter $ dhcpMaxClientLeadTime $ dhcpFailOverEndpointState $ dhcpStatements)
X-NDS_CONTAINMENT ('o' 'ou' 'dc') )

103
dhcp.spec
View File

@ -12,8 +12,11 @@
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
Name: dhcp
Version: 3.0.6
Release: 8%{?dist}
Version: 3.1.0
Release: 1%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer made
# incorrect use of the epoch and that's why it is at 12 now. It should have
# never been used, but it was. So we are stuck with it.
Epoch: 12
License: ISC
Group: System Environment/Daemons
@ -31,28 +34,29 @@ Source9: linux
Source10: Makefile.dist
Source11: dhcp4client.h
Source12: libdhcp_control.h
Source13: dhcp.schema
Patch0: %{name}-3.0.5-Makefile.patch
Patch1: %{name}-3.0.5-warnings.patch
Patch2: %{name}-3.0.5-errwarn-message.patch
Patch3: %{name}-3.0.5-ldap-configuration.patch
Patch4: %{name}-3.0.6-memory.patch
Patch5: %{name}-3.0.6-options.patch
Patch6: %{name}-3.0.5-release-by-ifup.patch
Patch7: %{name}-3.0.5-dhclient-decline-backoff.patch
Patch8: %{name}-3.0.5-enable-timeout-functions.patch
Patch9: %{name}-3.0.5-inherit-leases.patch
Patch10: %{name}-3.0.5-unicast-bootp.patch
Patch11: %{name}-3.0.5-fast-timeout.patch
Patch12: %{name}-3.0.5-failover-ports.patch
Patch13: %{name}-3.0.6-dhclient-usage.patch
Patch14: %{name}-3.0.5-default-requested-options.patch
Patch15: %{name}-3.0.5-prototypes.patch
Patch16: %{name}-3.0.6-manpages.patch
Patch17: %{name}-3.0.6-libdhcp4client.patch
Patch18: %{name}-3.0.6-xen-checksum.patch
Patch19: %{name}-3.0.5-dhclient-anycast.patch
Patch20: %{name}-3.0.6-ignore-hyphen-x.patch
Patch1: %{name}-3.0.5-errwarn-message.patch
Patch2: %{name}-3.1.0-ldap-configuration.patch
Patch3: %{name}-3.0.6-memory.patch
Patch4: %{name}-3.1.0-options.patch
Patch5: %{name}-3.0.5-release-by-ifup.patch
Patch6: %{name}-3.0.5-dhclient-decline-backoff.patch
Patch7: %{name}-3.0.5-enable-timeout-functions.patch
Patch8: %{name}-3.0.5-inherit-leases.patch
Patch9: %{name}-3.0.5-unicast-bootp.patch
Patch10: %{name}-3.0.5-fast-timeout.patch
Patch11: %{name}-3.0.5-failover-ports.patch
Patch12: %{name}-3.1.0-dhclient-usage.patch
Patch13: %{name}-3.0.5-default-requested-options.patch
Patch14: %{name}-3.0.5-prototypes.patch
Patch15: %{name}-3.0.6-manpages.patch
Patch16: %{name}-3.1.0-libdhcp4client.patch
Patch17: %{name}-3.1.0-xen-checksum.patch
Patch18: %{name}-3.1.0-dhclient-anycast.patch
Patch19: %{name}-3.0.6-ignore-hyphen-x.patch
Patch20: %{name}-3.1.0-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: groff openldap-devel
@ -148,61 +152,58 @@ libdhcp4client.
# Use $(MAKE) and $(CC) in the Makefiles
%patch0 -p1 -b .Makefile
# Fix up anything that fails -Wall -Werror
%patch1 -p1 -b .warnings
# Replace the standard ISC warning message about requesting help with an
# explanation that this is a patched build of ISC DHCP and bugs should be
# reported through bugzilla.redhat.com
%patch2 -p1 -b .message
%patch1 -p1 -b .message
# Add support for dhcpd.conf data in LDAP
%patch3 -p1 -b .ldap
%patch2 -p1 -b .ldap
# Fix memory alignment and initialization problems in common/packet.c
# Fix buffer overflow in minires library
# Init struct sock_prog in common/lpf.c to NULL
%patch4 -p1 -b .memory
%patch3 -p1 -b .memory
# Add more dhclient options (-I, -B, -H, -F, -T, -V, and -R)
%patch5 -p1 -b .options
%patch4 -p1 -b .options
# Handle releasing interfaces requested by /sbin/ifup
# pid file is assumed to be /var/run/dhclient-$interface.pid
%patch6 -p1 -b .release
%patch5 -p1 -b .release
# If we receive a DHCP offer in dhclient and it's DECLINEd in dhclient-script,
# backoff for an amount of time before trying again
%patch7 -p1 -b .decline
%patch6 -p1 -b .decline
# Enable cancel_all_timeouts() and relinquish_timeouts() regardless of
# the DEBUG_MEMORY_LEAKAGE_ON_EXIT macro
%patch8 -p1 -b .etf
%patch7 -p1 -b .etf
# Inherit active leases
%patch9 -p1 -b .inherit
%patch8 -p1 -b .inherit
# Support unicast BOOTP for IBM pSeries systems (and maybe others)
%patch10 -p1 -b .unicast
%patch9 -p1 -b .unicast
# Fast timeout for dhclient
%patch11 -p1 -b .fast
%patch10 -p1 -b .fast
# Use the following IANA-registered failover ports:
# dhcp-failover 647/tcp
# dhcp-failover 647/udp
# dhcp-failover 847/tcp
# dhcp-failover 847/udp
%patch12 -p1 -b .failover
%patch11 -p1 -b .failover
# Update the usage screen for dhclient(8) indicating new options
# Use printf() rather than log_info() to display the information
# Also, return EXIT_FAILURE when the usage() screen is displayed (stop parsing)
%patch13 -p1 -b .usage
%patch12 -p1 -b .usage
# Add NIS domain, NIS servers, and NTP servers to the list of default
# requested DHCP options
%patch14 -p1 -b .dho
%patch13 -p1 -b .dho
# Add missing prototypes to take care of gcc warnings
# in dst/dst_api.c: add b64_pton() and b64_ntop()
@ -211,7 +212,7 @@ libdhcp4client.
# in minires/res_comp.c: add ns_name_uncompress(), ns_name_compress(), and
# ns_name_skip()
# in minires/res_init.c: add res_randomid()
%patch15 -p1 -b .prototypes
%patch14 -p1 -b .prototypes
# Man page updates explaining new features added from the above patches.
# Normally these man page changes would be included in the feature patch,
@ -221,19 +222,22 @@ libdhcp4client.
# and not affect the code changes in the other patches. It's actually
# pretty common to update or alter these man pages independent of the code
# changes.
%patch16 -p1 -b .manpages
%patch15 -p1 -b .manpages
# Add the libdhcp4client target (library version of dhclient)
%patch17 -p1 -b .libdhcp4client
%patch16 -p1 -b .libdhcp4client
# Handle Xen partial UDP checksums
%patch18 -p1 -b .xen
%patch17 -p1 -b .xen
# Add anycast support to dhclient (for OLPC)
%patch19 -p1 -b .anycast
%patch18 -p1 -b .anycast
# Ignore the old extended new option info command line switch (-x)
%patch20 -p1 -b .enoi
%patch19 -p1 -b .enoi
# Fix up anything that fails -Wall -Werror
%patch20 -p1 -b .warnings
# Copy in documentation and example scripts for LDAP patch to dhcpd
%{__install} -p -m 0644 %SOURCE6 .
@ -325,6 +329,10 @@ EOF
# Install default (empty) dhcpd.conf:
%{__cp} -fp %SOURCE4 %{buildroot}%{_sysconfdir}
# Install dhcp.schema for LDAP configuration
%{__mkdir} -p %{buildroot}%{_sysconfdir}/openldap
%{__install} -p -m 0644 -D %SOURCE13 %{buildroot}%{_sysconfdir}/openldap
%{__install} -p -m 0644 -D libdhcp4client.pc %{buildroot}%{_libdir}/pkgconfig/libdhcp4client.pc
# Sources files can't be symlinks for debuginfo package generation
@ -371,6 +379,7 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/dhcpd
%config(noreplace) %{_sysconfdir}/sysconfig/dhcrelay
%config(noreplace) %{_sysconfdir}/dhcpd.conf
%config(noreplace) %{_sysconfdir}/openldap/dhcp.schema
%{_initrddir}/dhcpd
%{_initrddir}/dhcrelay
%{_bindir}/omshell
@ -426,6 +435,12 @@ fi
%{_libdir}/libdhcp4client.a
%changelog
* Tue Oct 23 2007 David Cantrell <dcantrell@redhat.com> - 12:3.1.0-1
- Upgrade to ISC dhcp-3.1.0
- Remove unnecessary /usr/include/dhcp4client/isc_dhcp headers
- Make sure restorecon is run on /var/lib/dhcpd/dhcpd.leases (#251688)
- Install dhcp.schema to /etc/openldap/dhcp.schema (#330471)
* Mon Oct 08 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.6-8
- Init script fixes (#320761)
- Removed linux.dbus-example script since we aren't using dhcdbd now

View File

@ -53,7 +53,7 @@ conf="$(findConfig "$DHCPDARGS")"
if [ ! -f /var/lib/dhcpd/dhcpd.leases ] ; then
mkdir -p /var/lib/dhcpd
touch /var/lib/dhcpd/dhcpd.leases
[ -x /sbin/restorecon ] && [ -d /selinux ] && /sbin/restorecon /var/lib/dhcp/dhcpd.leases >/dev/null 2>&1
[ -x /sbin/restorecon ] && [ -d /selinux ] && /sbin/restorecon /var/lib/dhcpd/dhcpd.leases >/dev/null 2>&1
fi
configtest() {

View File

@ -1 +1 @@
724bad21ad8b638abadd5fcc07df1a0f dhcp-3.0.6.tar.gz
27d179a3c3fbef576566b456a1168246 dhcp-3.1.0.tar.gz