- read_function() comes from the LDAP patch, so fix it there
- Init new struct universe structs in libdhcp4client so we don't crash on multiple DHCP attempts (#428203)
This commit is contained in:
parent
bb45555cf9
commit
72bd6fec2f
@ -1,6 +1,6 @@
|
|||||||
diff -up dhcp-4.0.0/server/Makefile.am.ldap dhcp-4.0.0/server/Makefile.am
|
diff -up dhcp-4.0.0/server/Makefile.am.ldap dhcp-4.0.0/server/Makefile.am
|
||||||
--- dhcp-4.0.0/server/Makefile.am.ldap 2007-05-29 06:32:11.000000000 -1000
|
--- dhcp-4.0.0/server/Makefile.am.ldap 2007-05-29 06:32:11.000000000 -1000
|
||||||
+++ dhcp-4.0.0/server/Makefile.am 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/Makefile.am 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -4,12 +4,10 @@ dist_sysconf_DATA = dhcpd.conf
|
@@ -4,12 +4,10 @@ dist_sysconf_DATA = dhcpd.conf
|
||||||
sbin_PROGRAMS = dhcpd
|
sbin_PROGRAMS = dhcpd
|
||||||
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
||||||
@ -19,7 +19,7 @@ diff -up dhcp-4.0.0/server/Makefile.am.ldap dhcp-4.0.0/server/Makefile.am
|
|||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
diff -up dhcp-4.0.0/server/mdb.c.ldap dhcp-4.0.0/server/mdb.c
|
diff -up dhcp-4.0.0/server/mdb.c.ldap dhcp-4.0.0/server/mdb.c
|
||||||
--- dhcp-4.0.0/server/mdb.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
--- dhcp-4.0.0/server/mdb.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
||||||
+++ dhcp-4.0.0/server/mdb.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/mdb.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -600,6 +600,12 @@ int find_hosts_by_haddr (struct host_dec
|
@@ -600,6 +600,12 @@ int find_hosts_by_haddr (struct host_dec
|
||||||
const char *file, int line)
|
const char *file, int line)
|
||||||
{
|
{
|
||||||
@ -34,8 +34,8 @@ diff -up dhcp-4.0.0/server/mdb.c.ldap dhcp-4.0.0/server/mdb.c
|
|||||||
h.hlen = hlen + 1;
|
h.hlen = hlen + 1;
|
||||||
h.hbuf [0] = htype;
|
h.hbuf [0] = htype;
|
||||||
diff -up /dev/null dhcp-4.0.0/server/ldap_casa.c
|
diff -up /dev/null dhcp-4.0.0/server/ldap_casa.c
|
||||||
--- /dev/null 2008-01-11 10:40:59.147013395 -1000
|
--- /dev/null 2008-01-19 23:52:35.158021373 -1000
|
||||||
+++ dhcp-4.0.0/server/ldap_casa.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/ldap_casa.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -0,0 +1,138 @@
|
@@ -0,0 +1,138 @@
|
||||||
+/* ldap_casa.c
|
+/* ldap_casa.c
|
||||||
+
|
+
|
||||||
@ -177,7 +177,7 @@ diff -up /dev/null dhcp-4.0.0/server/ldap_casa.c
|
|||||||
+
|
+
|
||||||
diff -up dhcp-4.0.0/server/dhcpd.c.ldap dhcp-4.0.0/server/dhcpd.c
|
diff -up dhcp-4.0.0/server/dhcpd.c.ldap dhcp-4.0.0/server/dhcpd.c
|
||||||
--- dhcp-4.0.0/server/dhcpd.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
--- dhcp-4.0.0/server/dhcpd.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
||||||
+++ dhcp-4.0.0/server/dhcpd.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/dhcpd.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -505,6 +505,14 @@ main(int argc, char **argv) {
|
@@ -505,6 +505,14 @@ main(int argc, char **argv) {
|
||||||
/* Add the ddns update style enumeration prior to parsing. */
|
/* Add the ddns update style enumeration prior to parsing. */
|
||||||
add_enumeration (&ddns_styles);
|
add_enumeration (&ddns_styles);
|
||||||
@ -194,8 +194,8 @@ diff -up dhcp-4.0.0/server/dhcpd.c.ldap dhcp-4.0.0/server/dhcpd.c
|
|||||||
if (!group_allocate (&root_group, MDL))
|
if (!group_allocate (&root_group, MDL))
|
||||||
log_fatal ("Can't allocate root group!");
|
log_fatal ("Can't allocate root group!");
|
||||||
diff -up /dev/null dhcp-4.0.0/server/ldap.c
|
diff -up /dev/null dhcp-4.0.0/server/ldap.c
|
||||||
--- /dev/null 2008-01-11 10:40:59.147013395 -1000
|
--- /dev/null 2008-01-19 23:52:35.158021373 -1000
|
||||||
+++ dhcp-4.0.0/server/ldap.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/ldap.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -0,0 +1,2004 @@
|
@@ -0,0 +1,2004 @@
|
||||||
+/* ldap.c
|
+/* ldap.c
|
||||||
+
|
+
|
||||||
@ -2203,7 +2203,7 @@ diff -up /dev/null dhcp-4.0.0/server/ldap.c
|
|||||||
+#endif
|
+#endif
|
||||||
diff -up dhcp-4.0.0/server/confpars.c.ldap dhcp-4.0.0/server/confpars.c
|
diff -up dhcp-4.0.0/server/confpars.c.ldap dhcp-4.0.0/server/confpars.c
|
||||||
--- dhcp-4.0.0/server/confpars.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
--- dhcp-4.0.0/server/confpars.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
||||||
+++ dhcp-4.0.0/server/confpars.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/confpars.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -60,7 +60,17 @@ void parse_trace_setup ()
|
@@ -60,7 +60,17 @@ void parse_trace_setup ()
|
||||||
|
|
||||||
isc_result_t readconf ()
|
isc_result_t readconf ()
|
||||||
@ -2225,7 +2225,7 @@ diff -up dhcp-4.0.0/server/confpars.c.ldap dhcp-4.0.0/server/confpars.c
|
|||||||
isc_result_t read_conf_file (const char *filename, struct group *group,
|
isc_result_t read_conf_file (const char *filename, struct group *group,
|
||||||
diff -up dhcp-4.0.0/server/class.c.ldap dhcp-4.0.0/server/class.c
|
diff -up dhcp-4.0.0/server/class.c.ldap dhcp-4.0.0/server/class.c
|
||||||
--- dhcp-4.0.0/server/class.c.ldap 2007-09-05 07:32:10.000000000 -1000
|
--- dhcp-4.0.0/server/class.c.ldap 2007-09-05 07:32:10.000000000 -1000
|
||||||
+++ dhcp-4.0.0/server/class.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/server/class.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -84,6 +84,7 @@ int check_collection (packet, lease, col
|
@@ -84,6 +84,7 @@ int check_collection (packet, lease, col
|
||||||
int matched = 0;
|
int matched = 0;
|
||||||
int status;
|
int status;
|
||||||
@ -2255,7 +2255,7 @@ diff -up dhcp-4.0.0/server/class.c.ldap dhcp-4.0.0/server/class.c
|
|||||||
print_hex_1 (data.len,
|
print_hex_1 (data.len,
|
||||||
diff -up dhcp-4.0.0/server/stables.c.ldap dhcp-4.0.0/server/stables.c
|
diff -up dhcp-4.0.0/server/stables.c.ldap dhcp-4.0.0/server/stables.c
|
||||||
--- dhcp-4.0.0/server/stables.c.ldap 2007-11-20 08:34:37.000000000 -1000
|
--- dhcp-4.0.0/server/stables.c.ldap 2007-11-20 08:34:37.000000000 -1000
|
||||||
+++ dhcp-4.0.0/server/stables.c 2008-01-14 10:45:48.000000000 -1000
|
+++ dhcp-4.0.0/server/stables.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -238,9 +238,107 @@ static struct option server_options[] =
|
@@ -238,9 +238,107 @@ static struct option server_options[] =
|
||||||
{ "dhcpv6-lease-file-name", "t", &server_universe, 54, 1 },
|
{ "dhcpv6-lease-file-name", "t", &server_universe, 54, 1 },
|
||||||
{ "dhcpv6-pid-file-name", "t", &server_universe, 55, 1 },
|
{ "dhcpv6-pid-file-name", "t", &server_universe, 55, 1 },
|
||||||
@ -2366,7 +2366,7 @@ diff -up dhcp-4.0.0/server/stables.c.ldap dhcp-4.0.0/server/stables.c
|
|||||||
{ "ad-hoc", 1 },
|
{ "ad-hoc", 1 },
|
||||||
diff -up dhcp-4.0.0/dst/Makefile.am.ldap dhcp-4.0.0/dst/Makefile.am
|
diff -up dhcp-4.0.0/dst/Makefile.am.ldap dhcp-4.0.0/dst/Makefile.am
|
||||||
--- dhcp-4.0.0/dst/Makefile.am.ldap 2007-05-29 06:32:10.000000000 -1000
|
--- dhcp-4.0.0/dst/Makefile.am.ldap 2007-05-29 06:32:10.000000000 -1000
|
||||||
+++ dhcp-4.0.0/dst/Makefile.am 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/dst/Makefile.am 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -2,7 +2,12 @@ AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
|
@@ -2,7 +2,12 @@ AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
|
||||||
|
|
||||||
lib_LIBRARIES = libdst.a
|
lib_LIBRARIES = libdst.a
|
||||||
@ -2382,7 +2382,7 @@ diff -up dhcp-4.0.0/dst/Makefile.am.ldap dhcp-4.0.0/dst/Makefile.am
|
|||||||
EXTRA_DIST = dst_internal.h md5.h md5_locl.h
|
EXTRA_DIST = dst_internal.h md5.h md5_locl.h
|
||||||
diff -up dhcp-4.0.0/common/print.c.ldap dhcp-4.0.0/common/print.c
|
diff -up dhcp-4.0.0/common/print.c.ldap dhcp-4.0.0/common/print.c
|
||||||
--- dhcp-4.0.0/common/print.c.ldap 2007-10-01 04:47:35.000000000 -1000
|
--- dhcp-4.0.0/common/print.c.ldap 2007-10-01 04:47:35.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/print.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/common/print.c 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -163,9 +163,9 @@ char *print_base64 (const unsigned char
|
@@ -163,9 +163,9 @@ char *print_base64 (const unsigned char
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2398,7 +2398,7 @@ diff -up dhcp-4.0.0/common/print.c.ldap dhcp-4.0.0/common/print.c
|
|||||||
char *s;
|
char *s;
|
||||||
diff -up dhcp-4.0.0/common/conflex.c.ldap dhcp-4.0.0/common/conflex.c
|
diff -up dhcp-4.0.0/common/conflex.c.ldap dhcp-4.0.0/common/conflex.c
|
||||||
--- dhcp-4.0.0/common/conflex.c.ldap 2007-10-31 09:13:33.000000000 -1000
|
--- dhcp-4.0.0/common/conflex.c.ldap 2007-10-31 09:13:33.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/conflex.c 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/common/conflex.c 2008-01-22 15:10:31.000000000 -1000
|
||||||
@@ -43,6 +43,7 @@ static enum dhcp_token read_string PROTO
|
@@ -43,6 +43,7 @@ static enum dhcp_token read_string PROTO
|
||||||
static enum dhcp_token read_number PROTO ((int, struct parse *));
|
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 read_num_or_name PROTO ((int, struct parse *));
|
||||||
@ -2435,7 +2435,7 @@ diff -up dhcp-4.0.0/common/conflex.c.ldap dhcp-4.0.0/common/conflex.c
|
|||||||
c = cfile->inbuf [cfile->bufix];
|
c = cfile->inbuf [cfile->bufix];
|
||||||
cfile->bufix++;
|
cfile->bufix++;
|
||||||
}
|
}
|
||||||
@@ -1415,3 +1424,23 @@ intern(char *atom, enum dhcp_token dfv)
|
@@ -1415,3 +1424,25 @@ intern(char *atom, enum dhcp_token dfv)
|
||||||
}
|
}
|
||||||
return dfv;
|
return dfv;
|
||||||
}
|
}
|
||||||
@ -2445,23 +2445,25 @@ diff -up dhcp-4.0.0/common/conflex.c.ldap dhcp-4.0.0/common/conflex.c
|
|||||||
+{
|
+{
|
||||||
+ int c;
|
+ int c;
|
||||||
+
|
+
|
||||||
+ cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
|
+ ssize_t n = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
|
||||||
+ if (cfile -> buflen == 0) {
|
+ if (n == 0) {
|
||||||
+ c = EOF;
|
+ c = EOF;
|
||||||
+ cfile -> bufix = 0;
|
+ cfile -> bufix = 0;
|
||||||
+ } else if (cfile -> buflen < 0) {
|
+ cfile -> buflen = 0;
|
||||||
|
+ } else if (n < 0) {
|
||||||
+ c = EOF;
|
+ c = EOF;
|
||||||
+ cfile -> bufix = cfile -> buflen = 0;
|
+ cfile -> bufix = cfile -> buflen = 0;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ c = cfile -> inbuf [0];
|
+ c = cfile -> inbuf [0];
|
||||||
+ cfile -> bufix = 1;
|
+ cfile -> bufix = 1;
|
||||||
|
+ cfile -> buflen = n;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return c;
|
+ return c;
|
||||||
+}
|
+}
|
||||||
diff -up dhcp-4.0.0/includes/dhcpd.h.ldap dhcp-4.0.0/includes/dhcpd.h
|
diff -up dhcp-4.0.0/includes/dhcpd.h.ldap dhcp-4.0.0/includes/dhcpd.h
|
||||||
--- dhcp-4.0.0/includes/dhcpd.h.ldap 2007-12-08 09:36:00.000000000 -1000
|
--- dhcp-4.0.0/includes/dhcpd.h.ldap 2007-12-08 09:36:00.000000000 -1000
|
||||||
+++ dhcp-4.0.0/includes/dhcpd.h 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/includes/dhcpd.h 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -101,6 +101,11 @@ typedef time_t TIME;
|
@@ -101,6 +101,11 @@ typedef time_t TIME;
|
||||||
#include <isc-dhcp/result.h>
|
#include <isc-dhcp/result.h>
|
||||||
#include <omapip/omapip_p.h>
|
#include <omapip/omapip_p.h>
|
||||||
@ -2578,7 +2580,7 @@ diff -up dhcp-4.0.0/includes/dhcpd.h.ldap dhcp-4.0.0/includes/dhcpd.h
|
|||||||
HASH_FUNCTIONS_DECL(ia_na, unsigned char *, struct ia_na, ia_na_hash_t);
|
HASH_FUNCTIONS_DECL(ia_na, unsigned char *, struct ia_na, ia_na_hash_t);
|
||||||
diff -up dhcp-4.0.0/includes/site.h.ldap dhcp-4.0.0/includes/site.h
|
diff -up dhcp-4.0.0/includes/site.h.ldap dhcp-4.0.0/includes/site.h
|
||||||
--- dhcp-4.0.0/includes/site.h.ldap 2006-07-31 12:19:51.000000000 -1000
|
--- dhcp-4.0.0/includes/site.h.ldap 2006-07-31 12:19:51.000000000 -1000
|
||||||
+++ dhcp-4.0.0/includes/site.h 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/includes/site.h 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -183,3 +183,13 @@
|
@@ -183,3 +183,13 @@
|
||||||
traces. */
|
traces. */
|
||||||
|
|
||||||
@ -2594,8 +2596,8 @@ diff -up dhcp-4.0.0/includes/site.h.ldap dhcp-4.0.0/includes/site.h
|
|||||||
+
|
+
|
||||||
+#define USE_SSL
|
+#define USE_SSL
|
||||||
diff -up /dev/null dhcp-4.0.0/includes/ldap_casa.h
|
diff -up /dev/null dhcp-4.0.0/includes/ldap_casa.h
|
||||||
--- /dev/null 2008-01-11 10:40:59.147013395 -1000
|
--- /dev/null 2008-01-19 23:52:35.158021373 -1000
|
||||||
+++ dhcp-4.0.0/includes/ldap_casa.h 2008-01-14 10:42:59.000000000 -1000
|
+++ dhcp-4.0.0/includes/ldap_casa.h 2008-01-22 15:09:56.000000000 -1000
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,83 @@
|
||||||
+/* ldap_casa.h
|
+/* ldap_casa.h
|
||||||
+
|
+
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
diff -up dhcp-4.0.0/configure.ac.libdhcp4client dhcp-4.0.0/configure.ac
|
diff -up dhcp-4.0.0/configure.ac.libdhcp4client dhcp-4.0.0/configure.ac
|
||||||
--- dhcp-4.0.0/configure.ac.libdhcp4client 2007-12-14 08:24:56.000000000 -1000
|
--- dhcp-4.0.0/configure.ac.libdhcp4client 2007-12-14 08:24:56.000000000 -1000
|
||||||
+++ dhcp-4.0.0/configure.ac 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/configure.ac 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -1,5 +1,32 @@
|
@@ -1,5 +1,32 @@
|
||||||
AC_INIT([DHCP], [4.0.0], [dhcp-users@isc.org])
|
AC_INIT([DHCP], [4.0.0], [dhcp-users@isc.org])
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ diff -up dhcp-4.0.0/configure.ac.libdhcp4client dhcp-4.0.0/configure.ac
|
|||||||
# we sometimes need to know byte order for building packets
|
# we sometimes need to know byte order for building packets
|
||||||
diff -up dhcp-4.0.0/omapip/Makefile.am.libdhcp4client dhcp-4.0.0/omapip/Makefile.am
|
diff -up dhcp-4.0.0/omapip/Makefile.am.libdhcp4client dhcp-4.0.0/omapip/Makefile.am
|
||||||
--- dhcp-4.0.0/omapip/Makefile.am.libdhcp4client 2007-05-29 06:32:11.000000000 -1000
|
--- dhcp-4.0.0/omapip/Makefile.am.libdhcp4client 2007-05-29 06:32:11.000000000 -1000
|
||||||
+++ dhcp-4.0.0/omapip/Makefile.am 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/omapip/Makefile.am 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -1,10 +1,18 @@
|
@@ -1,10 +1,18 @@
|
||||||
lib_LIBRARIES = libomapi.a
|
lib_LIBRARIES = libomapi.a
|
||||||
+noinst_LIBRARIES = libomapiLIBDHCP.a
|
+noinst_LIBRARIES = libomapiLIBDHCP.a
|
||||||
@ -68,7 +68,7 @@ diff -up dhcp-4.0.0/omapip/Makefile.am.libdhcp4client dhcp-4.0.0/omapip/Makefile
|
|||||||
|
|
||||||
diff -up dhcp-4.0.0/omapip/dispatch.c.libdhcp4client dhcp-4.0.0/omapip/dispatch.c
|
diff -up dhcp-4.0.0/omapip/dispatch.c.libdhcp4client dhcp-4.0.0/omapip/dispatch.c
|
||||||
--- dhcp-4.0.0/omapip/dispatch.c.libdhcp4client 2007-11-30 11:51:43.000000000 -1000
|
--- dhcp-4.0.0/omapip/dispatch.c.libdhcp4client 2007-11-30 11:51:43.000000000 -1000
|
||||||
+++ dhcp-4.0.0/omapip/dispatch.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/omapip/dispatch.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -37,7 +37,7 @@
|
@@ -37,7 +37,7 @@
|
||||||
#include <omapip/omapip_p.h>
|
#include <omapip/omapip_p.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -79,8 +79,8 @@ diff -up dhcp-4.0.0/omapip/dispatch.c.libdhcp4client dhcp-4.0.0/omapip/dispatch.
|
|||||||
|
|
||||||
OMAPI_OBJECT_ALLOC (omapi_io,
|
OMAPI_OBJECT_ALLOC (omapi_io,
|
||||||
diff -up dhcp-4.0.0/omapip/errwarn.c.libdhcp4client dhcp-4.0.0/omapip/errwarn.c
|
diff -up dhcp-4.0.0/omapip/errwarn.c.libdhcp4client dhcp-4.0.0/omapip/errwarn.c
|
||||||
--- dhcp-4.0.0/omapip/errwarn.c.libdhcp4client 2008-01-14 13:03:05.000000000 -1000
|
--- dhcp-4.0.0/omapip/errwarn.c.libdhcp4client 2008-01-22 17:04:28.000000000 -1000
|
||||||
+++ dhcp-4.0.0/omapip/errwarn.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/omapip/errwarn.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -37,6 +37,11 @@
|
@@ -37,6 +37,11 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
@ -200,7 +200,7 @@ diff -up dhcp-4.0.0/omapip/errwarn.c.libdhcp4client dhcp-4.0.0/omapip/errwarn.c
|
|||||||
|
|
||||||
diff -up dhcp-4.0.0/omapip/alloc.c.libdhcp4client dhcp-4.0.0/omapip/alloc.c
|
diff -up dhcp-4.0.0/omapip/alloc.c.libdhcp4client dhcp-4.0.0/omapip/alloc.c
|
||||||
--- dhcp-4.0.0/omapip/alloc.c.libdhcp4client 2007-07-12 20:43:42.000000000 -1000
|
--- dhcp-4.0.0/omapip/alloc.c.libdhcp4client 2007-07-12 20:43:42.000000000 -1000
|
||||||
+++ dhcp-4.0.0/omapip/alloc.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/omapip/alloc.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -37,6 +37,33 @@
|
@@ -37,6 +37,33 @@
|
||||||
|
|
||||||
#include <omapip/omapip_p.h>
|
#include <omapip/omapip_p.h>
|
||||||
@ -257,8 +257,8 @@ diff -up dhcp-4.0.0/omapip/alloc.c.libdhcp4client dhcp-4.0.0/omapip/alloc.c
|
|||||||
|
|
||||||
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
|
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
|
||||||
diff -up dhcp-4.0.0/dst/Makefile.am.libdhcp4client dhcp-4.0.0/dst/Makefile.am
|
diff -up dhcp-4.0.0/dst/Makefile.am.libdhcp4client dhcp-4.0.0/dst/Makefile.am
|
||||||
--- dhcp-4.0.0/dst/Makefile.am.libdhcp4client 2008-01-14 13:03:05.000000000 -1000
|
--- dhcp-4.0.0/dst/Makefile.am.libdhcp4client 2008-01-22 17:04:28.000000000 -1000
|
||||||
+++ dhcp-4.0.0/dst/Makefile.am 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/dst/Makefile.am 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
|
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
|
||||||
|
|
||||||
lib_LIBRARIES = libdst.a
|
lib_LIBRARIES = libdst.a
|
||||||
@ -279,7 +279,7 @@ diff -up dhcp-4.0.0/dst/Makefile.am.libdhcp4client dhcp-4.0.0/dst/Makefile.am
|
|||||||
EXTRA_DIST = dst_internal.h md5.h md5_locl.h
|
EXTRA_DIST = dst_internal.h md5.h md5_locl.h
|
||||||
diff -up dhcp-4.0.0/dst/hmac_link.c.libdhcp4client dhcp-4.0.0/dst/hmac_link.c
|
diff -up dhcp-4.0.0/dst/hmac_link.c.libdhcp4client dhcp-4.0.0/dst/hmac_link.c
|
||||||
--- dhcp-4.0.0/dst/hmac_link.c.libdhcp4client 2007-12-05 14:50:22.000000000 -1000
|
--- dhcp-4.0.0/dst/hmac_link.c.libdhcp4client 2007-12-05 14:50:22.000000000 -1000
|
||||||
+++ dhcp-4.0.0/dst/hmac_link.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/dst/hmac_link.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -39,6 +39,10 @@ static const char rcsid[] = "$Header: /p
|
@@ -39,6 +39,10 @@ static const char rcsid[] = "$Header: /p
|
||||||
|
|
||||||
#include "dst_internal.h"
|
#include "dst_internal.h"
|
||||||
@ -367,7 +367,7 @@ diff -up dhcp-4.0.0/dst/hmac_link.c.libdhcp4client dhcp-4.0.0/dst/hmac_link.c
|
|||||||
memset(dst_t_func[KEY_HMAC_MD5], 0, sizeof(struct dst_func));
|
memset(dst_t_func[KEY_HMAC_MD5], 0, sizeof(struct dst_func));
|
||||||
diff -up dhcp-4.0.0/common/Makefile.am.libdhcp4client dhcp-4.0.0/common/Makefile.am
|
diff -up dhcp-4.0.0/common/Makefile.am.libdhcp4client dhcp-4.0.0/common/Makefile.am
|
||||||
--- dhcp-4.0.0/common/Makefile.am.libdhcp4client 2007-11-16 01:04:11.000000000 -1000
|
--- dhcp-4.0.0/common/Makefile.am.libdhcp4client 2007-11-16 01:04:11.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/Makefile.am 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/common/Makefile.am 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -1,11 +1,17 @@
|
@@ -1,11 +1,17 @@
|
||||||
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
|
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
|
||||||
|
|
||||||
@ -389,7 +389,7 @@ diff -up dhcp-4.0.0/common/Makefile.am.libdhcp4client dhcp-4.0.0/common/Makefile
|
|||||||
|
|
||||||
diff -up dhcp-4.0.0/common/discover.c.libdhcp4client dhcp-4.0.0/common/discover.c
|
diff -up dhcp-4.0.0/common/discover.c.libdhcp4client dhcp-4.0.0/common/discover.c
|
||||||
--- dhcp-4.0.0/common/discover.c.libdhcp4client 2007-10-05 12:29:51.000000000 -1000
|
--- dhcp-4.0.0/common/discover.c.libdhcp4client 2007-10-05 12:29:51.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/discover.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/common/discover.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -883,6 +883,10 @@ add_ipv6_addr_to_interface(struct interf
|
@@ -883,6 +883,10 @@ add_ipv6_addr_to_interface(struct interf
|
||||||
register that interface with the network I/O software, figure out what
|
register that interface with the network I/O software, figure out what
|
||||||
subnet it's on, and add it to the list of interfaces. */
|
subnet it's on, and add it to the list of interfaces. */
|
||||||
@ -431,7 +431,7 @@ diff -up dhcp-4.0.0/common/discover.c.libdhcp4client dhcp-4.0.0/common/discover.
|
|||||||
if (fallback_interface) {
|
if (fallback_interface) {
|
||||||
diff -up dhcp-4.0.0/common/tree.c.libdhcp4client dhcp-4.0.0/common/tree.c
|
diff -up dhcp-4.0.0/common/tree.c.libdhcp4client dhcp-4.0.0/common/tree.c
|
||||||
--- dhcp-4.0.0/common/tree.c.libdhcp4client 2007-08-22 03:41:37.000000000 -1000
|
--- dhcp-4.0.0/common/tree.c.libdhcp4client 2007-08-22 03:41:37.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/tree.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/common/tree.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -41,7 +41,7 @@
|
@@ -41,7 +41,7 @@
|
||||||
# include <regex.h>
|
# include <regex.h>
|
||||||
#endif
|
#endif
|
||||||
@ -451,7 +451,7 @@ diff -up dhcp-4.0.0/common/tree.c.libdhcp4client dhcp-4.0.0/common/tree.c
|
|||||||
struct data_string *result;
|
struct data_string *result;
|
||||||
diff -up dhcp-4.0.0/common/options.c.libdhcp4client dhcp-4.0.0/common/options.c
|
diff -up dhcp-4.0.0/common/options.c.libdhcp4client dhcp-4.0.0/common/options.c
|
||||||
--- dhcp-4.0.0/common/options.c.libdhcp4client 2007-11-30 11:51:43.000000000 -1000
|
--- dhcp-4.0.0/common/options.c.libdhcp4client 2007-11-30 11:51:43.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/options.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/common/options.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -3392,6 +3392,7 @@ fqdn6_universe_decode(struct option_stat
|
@@ -3392,6 +3392,7 @@ fqdn6_universe_decode(struct option_stat
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -461,8 +461,8 @@ diff -up dhcp-4.0.0/common/options.c.libdhcp4client dhcp-4.0.0/common/options.c
|
|||||||
struct client_state *client_state,
|
struct client_state *client_state,
|
||||||
struct option_state *in_options,
|
struct option_state *in_options,
|
||||||
diff -up dhcp-4.0.0/common/dispatch.c.libdhcp4client dhcp-4.0.0/common/dispatch.c
|
diff -up dhcp-4.0.0/common/dispatch.c.libdhcp4client dhcp-4.0.0/common/dispatch.c
|
||||||
--- dhcp-4.0.0/common/dispatch.c.libdhcp4client 2008-01-14 13:03:05.000000000 -1000
|
--- dhcp-4.0.0/common/dispatch.c.libdhcp4client 2008-01-22 17:04:28.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/dispatch.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/common/dispatch.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -34,8 +34,24 @@
|
@@ -34,8 +34,24 @@
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -734,7 +734,7 @@ diff -up dhcp-4.0.0/common/dispatch.c.libdhcp4client dhcp-4.0.0/common/dispatch.
|
|||||||
}
|
}
|
||||||
diff -up dhcp-4.0.0/common/alloc.c.libdhcp4client dhcp-4.0.0/common/alloc.c
|
diff -up dhcp-4.0.0/common/alloc.c.libdhcp4client dhcp-4.0.0/common/alloc.c
|
||||||
--- dhcp-4.0.0/common/alloc.c.libdhcp4client 2007-10-23 14:54:11.000000000 -1000
|
--- dhcp-4.0.0/common/alloc.c.libdhcp4client 2007-10-23 14:54:11.000000000 -1000
|
||||||
+++ dhcp-4.0.0/common/alloc.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/common/alloc.c 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -1004,7 +1004,11 @@ int executable_statement_reference (ptr,
|
@@ -1004,7 +1004,11 @@ int executable_statement_reference (ptr,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -748,8 +748,8 @@ diff -up dhcp-4.0.0/common/alloc.c.libdhcp4client dhcp-4.0.0/common/alloc.c
|
|||||||
#if defined (DEBUG_MEMORY_LEAKAGE) || \
|
#if defined (DEBUG_MEMORY_LEAKAGE) || \
|
||||||
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
||||||
diff -up dhcp-4.0.0/includes/dhcpd.h.libdhcp4client dhcp-4.0.0/includes/dhcpd.h
|
diff -up dhcp-4.0.0/includes/dhcpd.h.libdhcp4client dhcp-4.0.0/includes/dhcpd.h
|
||||||
--- dhcp-4.0.0/includes/dhcpd.h.libdhcp4client 2008-01-14 13:03:05.000000000 -1000
|
--- dhcp-4.0.0/includes/dhcpd.h.libdhcp4client 2008-01-22 17:04:28.000000000 -1000
|
||||||
+++ dhcp-4.0.0/includes/dhcpd.h 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/includes/dhcpd.h 2008-01-22 17:05:02.000000000 -1000
|
||||||
@@ -1199,14 +1199,6 @@ struct hardware_link {
|
@@ -1199,14 +1199,6 @@ struct hardware_link {
|
||||||
|
|
||||||
typedef void (*tvref_t)(void *, void *, const char *, int);
|
typedef void (*tvref_t)(void *, void *, const char *, int);
|
||||||
@ -781,9 +781,20 @@ diff -up dhcp-4.0.0/includes/dhcpd.h.libdhcp4client dhcp-4.0.0/includes/dhcpd.h
|
|||||||
extern omapi_object_type_t *dhcp_type_interface;
|
extern omapi_object_type_t *dhcp_type_interface;
|
||||||
#if defined (TRACING)
|
#if defined (TRACING)
|
||||||
extern trace_type_t *interface_trace;
|
extern trace_type_t *interface_trace;
|
||||||
|
@@ -2392,6 +2382,10 @@ extern struct universe dhcpv6_universe;
|
||||||
|
extern struct universe nwip_universe;
|
||||||
|
extern struct universe fqdn_universe;
|
||||||
|
extern struct universe vsio_universe;
|
||||||
|
+extern struct universe vendor_class_universe;
|
||||||
|
+extern struct universe vendor_universe;
|
||||||
|
+extern struct universe isc_universe;
|
||||||
|
+extern struct universe isc6_universe;
|
||||||
|
extern int dhcp_option_default_priority_list [];
|
||||||
|
extern int dhcp_option_default_priority_list_count;
|
||||||
|
extern const char *hardware_types [256];
|
||||||
diff -up dhcp-4.0.0/client/Makefile.am.libdhcp4client dhcp-4.0.0/client/Makefile.am
|
diff -up dhcp-4.0.0/client/Makefile.am.libdhcp4client dhcp-4.0.0/client/Makefile.am
|
||||||
--- dhcp-4.0.0/client/Makefile.am.libdhcp4client 2007-12-12 09:23:42.000000000 -1000
|
--- dhcp-4.0.0/client/Makefile.am.libdhcp4client 2007-12-12 09:23:42.000000000 -1000
|
||||||
+++ dhcp-4.0.0/client/Makefile.am 2008-01-14 13:03:24.000000000 -1000
|
+++ dhcp-4.0.0/client/Makefile.am 2008-01-22 17:04:28.000000000 -1000
|
||||||
@@ -1,10 +1,18 @@
|
@@ -1,10 +1,18 @@
|
||||||
dist_sysconf_DATA = dhclient.conf
|
dist_sysconf_DATA = dhclient.conf
|
||||||
sbin_PROGRAMS = dhclient
|
sbin_PROGRAMS = dhclient
|
||||||
@ -804,8 +815,8 @@ diff -up dhcp-4.0.0/client/Makefile.am.libdhcp4client dhcp-4.0.0/client/Makefile
|
|||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.c
|
diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.c
|
||||||
--- dhcp-4.0.0/client/dhclient.c.libdhcp4client 2008-01-14 13:03:05.000000000 -1000
|
--- dhcp-4.0.0/client/dhclient.c.libdhcp4client 2008-01-22 17:04:28.000000000 -1000
|
||||||
+++ dhcp-4.0.0/client/dhclient.c 2008-01-14 13:03:05.000000000 -1000
|
+++ dhcp-4.0.0/client/dhclient.c 2008-01-22 17:05:47.000000000 -1000
|
||||||
@@ -83,14 +83,50 @@ int nowait=0;
|
@@ -83,14 +83,50 @@ int nowait=0;
|
||||||
char *mockup_relay = NULL;
|
char *mockup_relay = NULL;
|
||||||
int bootp_broadcast_always = 0;
|
int bootp_broadcast_always = 0;
|
||||||
@ -931,7 +942,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
/* If we're not supposed to wait before getting the address,
|
/* If we're not supposed to wait before getting the address,
|
||||||
don't. */
|
don't. */
|
||||||
if (nowait)
|
if (nowait)
|
||||||
@@ -875,6 +925,126 @@ main(int argc, char **argv) {
|
@@ -875,6 +925,132 @@ main(int argc, char **argv) {
|
||||||
|
|
||||||
/* Start dispatching packets and timeouts... */
|
/* Start dispatching packets and timeouts... */
|
||||||
dispatch ();
|
dispatch ();
|
||||||
@ -1027,8 +1038,14 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
+ dhcp_type_shared_network = NULL;
|
+ dhcp_type_shared_network = NULL;
|
||||||
+ dhcp_type_control = NULL;
|
+ dhcp_type_control = NULL;
|
||||||
+ memset(&dhcp_universe, '\0', sizeof(struct universe));
|
+ memset(&dhcp_universe, '\0', sizeof(struct universe));
|
||||||
|
+ memset(&dhcpv6_universe, '\0', sizeof(struct universe));
|
||||||
+ memset(&nwip_universe, '\0', sizeof(struct universe));
|
+ memset(&nwip_universe, '\0', sizeof(struct universe));
|
||||||
+ memset(&fqdn_universe, '\0', sizeof(struct universe));
|
+ memset(&fqdn_universe, '\0', sizeof(struct universe));
|
||||||
|
+ memset(&vendor_class_universe, '\0', sizeof(struct universe));
|
||||||
|
+ memset(&vendor_universe, '\0', sizeof(struct universe));
|
||||||
|
+ memset(&vsio_universe, '\0', sizeof(struct universe));
|
||||||
|
+ memset(&isc_universe, '\0', sizeof(struct universe));
|
||||||
|
+ memset(&isc6_universe, '\0', sizeof(struct universe));
|
||||||
+ universe_hash = 0;
|
+ universe_hash = 0;
|
||||||
+ universes = 0;
|
+ universes = 0;
|
||||||
+ universe_count = 0;
|
+ universe_count = 0;
|
||||||
@ -1058,7 +1075,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
|
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1270,7 +1440,20 @@ void dhcpack (packet)
|
@@ -1270,7 +1446,20 @@ void dhcpack (packet)
|
||||||
if (client -> new -> rebind < cur_time)
|
if (client -> new -> rebind < cur_time)
|
||||||
client -> new -> rebind = TIME_MAX;
|
client -> new -> rebind = TIME_MAX;
|
||||||
|
|
||||||
@ -1079,7 +1096,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bind_lease (client)
|
void bind_lease (client)
|
||||||
@@ -1306,6 +1489,9 @@ void bind_lease (client)
|
@@ -1306,6 +1495,9 @@ void bind_lease (client)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1089,7 +1106,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
/* Write out the new lease. */
|
/* Write out the new lease. */
|
||||||
write_client_lease (client, client -> new, 0, 0);
|
write_client_lease (client, client -> new, 0, 0);
|
||||||
|
|
||||||
@@ -1398,10 +1584,12 @@ void state_stop (cpp)
|
@@ -1398,10 +1590,12 @@ void state_stop (cpp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1102,7 +1119,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
|
|
||||||
int write_lease (lease)
|
int write_lease (lease)
|
||||||
struct lease *lease;
|
struct lease *lease;
|
||||||
@@ -2074,6 +2262,10 @@ void state_panic (cpp)
|
@@ -2074,6 +2268,10 @@ void state_panic (cpp)
|
||||||
tell the shell script that we failed to allocate an address,
|
tell the shell script that we failed to allocate an address,
|
||||||
and try again later. */
|
and try again later. */
|
||||||
if (onetry) {
|
if (onetry) {
|
||||||
@ -1113,7 +1130,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
log_info ("Unable to obtain a lease on first try.%s",
|
log_info ("Unable to obtain a lease on first try.%s",
|
||||||
" Exiting.");
|
" Exiting.");
|
||||||
@@ -2691,7 +2883,9 @@ void destroy_client_lease (lease)
|
@@ -2691,7 +2889,9 @@ void destroy_client_lease (lease)
|
||||||
free_client_lease (lease, MDL);
|
free_client_lease (lease, MDL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1123,7 +1140,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
int leases_written = 0;
|
int leases_written = 0;
|
||||||
|
|
||||||
void rewrite_client_leases ()
|
void rewrite_client_leases ()
|
||||||
@@ -3218,6 +3412,54 @@ void script_write_params (client, prefix
|
@@ -3218,6 +3418,54 @@ void script_write_params (client, prefix
|
||||||
int script_go (client)
|
int script_go (client)
|
||||||
struct client_state *client;
|
struct client_state *client;
|
||||||
{
|
{
|
||||||
@ -1178,7 +1195,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
char *scriptName;
|
char *scriptName;
|
||||||
char *argv [2];
|
char *argv [2];
|
||||||
char **envp;
|
char **envp;
|
||||||
@@ -3294,6 +3536,7 @@ int script_go (client)
|
@@ -3294,6 +3542,7 @@ int script_go (client)
|
||||||
time(&cur_time);
|
time(&cur_time);
|
||||||
return (WIFEXITED (wstatus) ?
|
return (WIFEXITED (wstatus) ?
|
||||||
WEXITSTATUS (wstatus) : -WTERMSIG (wstatus));
|
WEXITSTATUS (wstatus) : -WTERMSIG (wstatus));
|
||||||
@ -1186,7 +1203,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
}
|
}
|
||||||
|
|
||||||
void client_envadd (struct client_state *client,
|
void client_envadd (struct client_state *client,
|
||||||
@@ -3376,6 +3619,9 @@ void go_daemon ()
|
@@ -3376,6 +3625,9 @@ void go_daemon ()
|
||||||
|
|
||||||
/* Don't become a daemon if the user requested otherwise. */
|
/* Don't become a daemon if the user requested otherwise. */
|
||||||
if (no_daemon) {
|
if (no_daemon) {
|
||||||
@ -1196,7 +1213,7 @@ diff -up dhcp-4.0.0/client/dhclient.c.libdhcp4client dhcp-4.0.0/client/dhclient.
|
|||||||
write_client_pid_file ();
|
write_client_pid_file ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3385,6 +3631,10 @@ void go_daemon ()
|
@@ -3385,6 +3637,10 @@ void go_daemon ()
|
||||||
return;
|
return;
|
||||||
state = 1;
|
state = 1;
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
diff -up dhcp-4.0.0/common/conflex.c.parse dhcp-4.0.0/common/conflex.c
|
|
||||||
--- dhcp-4.0.0/common/conflex.c.parse 2008-01-17 09:05:17.000000000 -1000
|
|
||||||
+++ dhcp-4.0.0/common/conflex.c 2008-01-17 09:06:48.000000000 -1000
|
|
||||||
@@ -1434,16 +1438,18 @@ read_function (struct parse * cfile)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
|
|
||||||
- cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
|
|
||||||
- if (cfile -> buflen == 0) {
|
|
||||||
+ ssize_t n = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
|
|
||||||
+ if (n == 0) {
|
|
||||||
c = EOF;
|
|
||||||
cfile -> bufix = 0;
|
|
||||||
- } else if (cfile -> buflen < 0) {
|
|
||||||
+ cfile -> buflen = 0;
|
|
||||||
+ } else if (n < 0) {
|
|
||||||
c = EOF;
|
|
||||||
cfile -> bufix = cfile -> buflen = 0;
|
|
||||||
} else {
|
|
||||||
c = cfile -> inbuf [0];
|
|
||||||
cfile -> bufix = 1;
|
|
||||||
+ cfile -> buflen = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
return c;
|
|
18
dhcp.spec
18
dhcp.spec
@ -4,10 +4,11 @@
|
|||||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.0.0
|
Version: 4.0.0
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer made
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# incorrect use of the epoch and that's why it is at 12 now. It should have
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# never been used, but it was. So we are stuck with it.
|
# 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
|
Epoch: 12
|
||||||
License: ISC
|
License: ISC
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -42,7 +43,6 @@ Patch13: %{name}-4.0.0-dhclient-anycast.patch
|
|||||||
Patch14: %{name}-4.0.0-manpages.patch
|
Patch14: %{name}-4.0.0-manpages.patch
|
||||||
Patch15: %{name}-4.0.0-paths.patch
|
Patch15: %{name}-4.0.0-paths.patch
|
||||||
Patch16: %{name}-4.0.0-libdhcp4client.patch
|
Patch16: %{name}-4.0.0-libdhcp4client.patch
|
||||||
Patch17: %{name}-4.0.0-parser.patch
|
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -189,9 +189,6 @@ client library.
|
|||||||
# Add the libdhcp4client target (library version of dhclient)
|
# Add the libdhcp4client target (library version of dhclient)
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
|
|
||||||
# Fix parsing errors
|
|
||||||
%patch17 -p1
|
|
||||||
|
|
||||||
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
||||||
%{__install} -p -m 0644 %{SOURCE5} .
|
%{__install} -p -m 0644 %{SOURCE5} .
|
||||||
%{__install} -p -m 0644 %{SOURCE6} doc/
|
%{__install} -p -m 0644 %{SOURCE6} doc/
|
||||||
@ -404,6 +401,11 @@ fi
|
|||||||
%{_libdir}/libdhcp4client.so
|
%{_libdir}/libdhcp4client.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 22 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-6
|
||||||
|
- read_function() comes from the LDAP patch, so fix it there
|
||||||
|
- Init new struct universe structs in libdhcp4client so we don't crash on
|
||||||
|
multiple DHCP attempts (#428203)
|
||||||
|
|
||||||
* Thu Jan 17 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-5
|
* Thu Jan 17 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-5
|
||||||
- Patch read_function() to handle size_t from read() correctly (#429207)
|
- Patch read_function() to handle size_t from read() correctly (#429207)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user