- Enable relinquish_timeouts() and cancel_all_timeouts() even when
DEBUG_MEMORY_LEAKAGE_ON_EXIT is not defined - Add prototypes for b64_pton() and b64_ntop in dst/ - Move variable declarations and labels around in the fix-warnings patch - Expand the list of objects needed for libdhcp4client (#215328) - Use libres.a in libdhcp4client since it gives correct minires objects - Remove the dhcp options table in C, Perl, Python, and text format (these were reference files added to /usr/share/doc)
This commit is contained in:
parent
9cf76837b4
commit
86a07e143d
@ -1,5 +1,5 @@
|
||||
--- dhcp-3.0.5/client/dhclient.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/client/dhclient.c 2006-11-10 11:58:30.000000000 -0500
|
||||
--- dhcp-3.0.5/client/dhclient.c.libdhcp4client 2006-11-13 22:25:37.000000000 -0500
|
||||
+++ dhcp-3.0.5/client/dhclient.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -78,7 +78,9 @@
|
||||
int extended_option_environment = 0;
|
||||
#endif
|
||||
@ -11,7 +11,7 @@
|
||||
static void usage PROTO ((void));
|
||||
|
||||
void do_release(struct client_state *);
|
||||
@@ -89,10 +91,59 @@
|
||||
@@ -89,10 +91,57 @@
|
||||
|
||||
extern u_int32_t default_requested_options[];
|
||||
|
||||
@ -23,8 +23,6 @@
|
||||
+{
|
||||
+ struct timeval tv={0,0}, *tvp;
|
||||
+ isc_result_t status;
|
||||
+ struct interface_info *ip;
|
||||
+ struct client_state *client;
|
||||
+
|
||||
+ /* Wait for a packet, or a timeout, or libdhcp being finished */
|
||||
+ do {
|
||||
@ -72,7 +70,15 @@
|
||||
int i;
|
||||
struct servent *ent;
|
||||
struct interface_info *ip;
|
||||
@@ -119,7 +170,7 @@
|
||||
@@ -105,7 +154,6 @@
|
||||
omapi_object_t *listener;
|
||||
isc_result_t result;
|
||||
int persist = 0;
|
||||
- int omapi_port;
|
||||
int no_dhclient_conf = 0;
|
||||
int no_dhclient_db = 0;
|
||||
int no_dhclient_pid = 0;
|
||||
@@ -119,7 +167,7 @@
|
||||
int timeout_arg = 0;
|
||||
char *arg_conf = 0L;
|
||||
int arg_conf_len=0;
|
||||
@ -81,7 +87,7 @@
|
||||
/* Make sure we have stdin, stdout and stderr. */
|
||||
i = open ("/dev/null", O_RDWR);
|
||||
if (i == 0)
|
||||
@@ -140,7 +191,7 @@
|
||||
@@ -140,7 +188,7 @@
|
||||
#if !(defined (DEBUG) || defined (SYSLOG_4_2) || defined (__CYGWIN32__))
|
||||
setlogmask (LOG_UPTO (LOG_INFO));
|
||||
#endif
|
||||
@ -90,7 +96,7 @@
|
||||
/* Set up the OMAPI. */
|
||||
status = omapi_init ();
|
||||
if (status != ISC_R_SUCCESS)
|
||||
@@ -469,9 +520,12 @@
|
||||
@@ -469,9 +517,12 @@
|
||||
log_fatal("dhclient(%u) is already running - exiting. ", dhcpid);
|
||||
return(1);
|
||||
}
|
||||
@ -105,7 +111,7 @@
|
||||
if (!quiet) {
|
||||
log_info ("%s %s", message, DHCP_VERSION);
|
||||
log_info (copyright);
|
||||
@@ -480,7 +534,7 @@
|
||||
@@ -480,7 +531,7 @@
|
||||
log_info ("%s", "");
|
||||
} else
|
||||
log_perror = 0;
|
||||
@ -114,7 +120,7 @@
|
||||
/* If we're given a relay agent address to insert, for testing
|
||||
purposes, figure out what it is. */
|
||||
if (relay) {
|
||||
@@ -767,12 +821,18 @@
|
||||
@@ -767,12 +818,18 @@
|
||||
arg_conf_len = 0L;
|
||||
}
|
||||
|
||||
@ -134,7 +140,7 @@
|
||||
/* XXX */
|
||||
/* config_counter(&snd_counter, &rcv_counter); */
|
||||
|
||||
@@ -790,7 +850,7 @@
|
||||
@@ -790,7 +847,7 @@
|
||||
if (!persist) {
|
||||
/* Nothing more to do. */
|
||||
log_info ("No broadcast interfaces found - exiting.");
|
||||
@ -143,7 +149,7 @@
|
||||
}
|
||||
} else if (!release_mode) {
|
||||
/* Call the script with the list of interfaces. */
|
||||
@@ -885,7 +945,7 @@
|
||||
@@ -885,7 +942,7 @@
|
||||
dmalloc_longterm = dmalloc_outstanding;
|
||||
dmalloc_outstanding = 0;
|
||||
#endif
|
||||
@ -152,7 +158,7 @@
|
||||
/* If we're not supposed to wait before getting the address,
|
||||
don't. */
|
||||
if (nowait)
|
||||
@@ -898,7 +958,123 @@
|
||||
@@ -898,7 +955,125 @@
|
||||
|
||||
/* Start dispatching packets and timeouts... */
|
||||
dispatch ();
|
||||
@ -167,7 +173,7 @@
|
||||
+ libdhcp_dispatch();
|
||||
+
|
||||
+ /* libdhcp is finished with us. */
|
||||
|
||||
+
|
||||
+ /* close all file descriptors: */
|
||||
+ for (ip = interfaces; ip; ip = ip -> next) {
|
||||
+ shutdown( ip -> wfdesc, SHUT_RDWR );
|
||||
@ -191,7 +197,7 @@
|
||||
+
|
||||
+ /* Free ALL allocated memory: */
|
||||
+ omapi_free_all_pointers();
|
||||
+
|
||||
|
||||
+ /* Re-Initialize globals: */
|
||||
+ client_env = 0;
|
||||
+ client_env_count = 0;
|
||||
@ -233,7 +239,9 @@
|
||||
+extern int have_setup_fallback;
|
||||
+ have_setup_fallback=0;
|
||||
+ quiet_interface_discovery=1;
|
||||
+#ifndef LIBDHCP
|
||||
+ timeouts = 0L;
|
||||
+#endif
|
||||
+ dhcp_type_interface=0L;
|
||||
+ interface_vector = 0L;
|
||||
+ interface_count =0;
|
||||
@ -276,7 +284,23 @@
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
@@ -1294,8 +1470,25 @@
|
||||
@@ -1091,7 +1266,6 @@
|
||||
picked = lp;
|
||||
picked -> next = (struct client_lease *)0;
|
||||
} else {
|
||||
- freeit:
|
||||
destroy_client_lease (lp);
|
||||
}
|
||||
}
|
||||
@@ -1149,7 +1323,6 @@
|
||||
struct client_lease *lease;
|
||||
struct option_cache *oc;
|
||||
struct data_string ds;
|
||||
- int i;
|
||||
|
||||
/* If we're not receptive to an offer right now, or if the offer
|
||||
has an unrecognizable transaction id, then just drop it. */
|
||||
@@ -1294,15 +1467,30 @@
|
||||
client -> new -> rebind += cur_time;
|
||||
if (client -> new -> rebind < cur_time)
|
||||
client -> new -> rebind = TIME_MAX;
|
||||
@ -302,7 +326,14 @@
|
||||
}
|
||||
|
||||
void bind_lease (client)
|
||||
@@ -1333,6 +1526,9 @@
|
||||
struct client_state *client;
|
||||
{
|
||||
- struct interface_info *ip = client -> interface;
|
||||
-
|
||||
/* Remember the medium. */
|
||||
client -> new -> medium = client -> medium;
|
||||
|
||||
@@ -1333,6 +1521,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@ -312,7 +343,23 @@
|
||||
/* Write out the new lease. */
|
||||
write_client_lease (client, client -> new, 0, 0);
|
||||
|
||||
@@ -1434,13 +1630,13 @@
|
||||
@@ -1368,7 +1559,6 @@
|
||||
void *cpp;
|
||||
{
|
||||
struct client_state *client = cpp;
|
||||
- int i;
|
||||
struct option_cache *oc;
|
||||
struct data_string ds;
|
||||
|
||||
@@ -1411,7 +1601,6 @@
|
||||
void *cpp;
|
||||
{
|
||||
struct client_state *client = cpp;
|
||||
- int i;
|
||||
|
||||
/* Cancel all timeouts. */
|
||||
cancel_timeout (state_selecting, client);
|
||||
@@ -1434,13 +1623,13 @@
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -328,7 +375,16 @@
|
||||
int write_host (host)
|
||||
struct host_decl *host;
|
||||
{
|
||||
@@ -2013,6 +2209,10 @@
|
||||
@@ -1524,8 +1713,6 @@
|
||||
int i;
|
||||
int stop_selecting;
|
||||
const char *name = packet -> packet_type ? "DHCPOFFER" : "BOOTREPLY";
|
||||
- struct iaddrlist *ap;
|
||||
- struct option_cache *oc;
|
||||
char obuf [1024];
|
||||
|
||||
#ifdef DEBUG_PACKET
|
||||
@@ -2013,6 +2200,10 @@
|
||||
tell the shell script that we failed to allocate an address,
|
||||
and try again later. */
|
||||
if (onetry) {
|
||||
@ -339,7 +395,50 @@
|
||||
if (!quiet)
|
||||
log_info ("Unable to obtain a lease on first try.%s",
|
||||
" Exiting.");
|
||||
@@ -2624,7 +2824,9 @@
|
||||
@@ -2344,7 +2535,6 @@
|
||||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char discover = DHCPDISCOVER;
|
||||
- int i;
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
|
||||
memset (&client -> packet, 0, sizeof (client -> packet));
|
||||
@@ -2409,9 +2599,6 @@
|
||||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char request = DHCPREQUEST;
|
||||
- int i, j;
|
||||
- unsigned char *tmp, *digest;
|
||||
- unsigned char *old_digest_loc;
|
||||
struct option_cache *oc;
|
||||
|
||||
memset (&client -> packet, 0, sizeof (client -> packet));
|
||||
@@ -2500,7 +2687,6 @@
|
||||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char decline = DHCPDECLINE;
|
||||
- int i;
|
||||
struct option_cache *oc;
|
||||
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
@@ -2557,7 +2743,6 @@
|
||||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char request = DHCPRELEASE;
|
||||
- int i;
|
||||
struct option_cache *oc;
|
||||
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
@@ -2614,8 +2799,6 @@
|
||||
void destroy_client_lease (lease)
|
||||
struct client_lease *lease;
|
||||
{
|
||||
- int i;
|
||||
-
|
||||
if (lease -> server_name)
|
||||
dfree (lease -> server_name, MDL);
|
||||
if (lease -> filename)
|
||||
@@ -2624,7 +2807,9 @@
|
||||
free_client_lease (lease, MDL);
|
||||
}
|
||||
|
||||
@ -349,7 +448,35 @@
|
||||
|
||||
void rewrite_client_leases ()
|
||||
{
|
||||
@@ -3069,16 +3271,60 @@
|
||||
@@ -2678,8 +2863,6 @@
|
||||
{
|
||||
const char *name, *dot;
|
||||
struct data_string ds;
|
||||
- int status;
|
||||
- struct client_state *client;
|
||||
|
||||
memset (&ds, 0, sizeof ds);
|
||||
|
||||
@@ -2710,9 +2893,7 @@
|
||||
int i;
|
||||
struct tm *t;
|
||||
static int leases_written;
|
||||
- struct option_cache *oc;
|
||||
struct data_string ds;
|
||||
- pair *hash;
|
||||
int errors = 0;
|
||||
char *s;
|
||||
|
||||
@@ -2992,8 +3173,6 @@
|
||||
int i;
|
||||
struct data_string data;
|
||||
struct option_cache *oc;
|
||||
- pair *hash;
|
||||
- char *s, *t;
|
||||
struct envadd_state es;
|
||||
|
||||
es.client = client;
|
||||
@@ -3071,16 +3250,60 @@
|
||||
int script_go (client)
|
||||
struct client_state *client;
|
||||
{
|
||||
@ -413,7 +540,7 @@
|
||||
|
||||
if (client)
|
||||
scriptName = client -> config -> script_name;
|
||||
@@ -3144,6 +3390,7 @@
|
||||
@@ -3146,6 +3369,7 @@
|
||||
GET_TIME (&cur_time);
|
||||
return (WIFEXITED (wstatus) ?
|
||||
WEXITSTATUS (wstatus) : -WTERMSIG (wstatus));
|
||||
@ -421,7 +548,16 @@
|
||||
}
|
||||
|
||||
void client_envadd (struct client_state *client,
|
||||
@@ -3234,6 +3481,9 @@
|
||||
@@ -3153,7 +3377,7 @@
|
||||
{
|
||||
char spbuf [1024];
|
||||
char *s;
|
||||
- unsigned len, i;
|
||||
+ unsigned len;
|
||||
struct string_list *val;
|
||||
va_list list;
|
||||
|
||||
@@ -3236,6 +3460,9 @@
|
||||
|
||||
/* Don't become a daemon if the user requested otherwise. */
|
||||
if (no_daemon) {
|
||||
@ -431,7 +567,7 @@
|
||||
write_client_pid_file ();
|
||||
return;
|
||||
}
|
||||
@@ -3242,7 +3492,9 @@
|
||||
@@ -3244,7 +3471,9 @@
|
||||
if (state)
|
||||
return;
|
||||
state = 1;
|
||||
@ -442,9 +578,68 @@
|
||||
/* Stop logging to stderr... */
|
||||
log_perror = 0;
|
||||
|
||||
--- dhcp-3.0.5/common/alloc.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/alloc.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -1016,9 +1016,11 @@
|
||||
@@ -3588,7 +3817,7 @@
|
||||
|
||||
isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
|
||||
{
|
||||
- struct data_string ddns_fqdn, ddns_fwd_name,
|
||||
+ struct data_string ddns_fwd_name,
|
||||
ddns_dhcid, client_identifier;
|
||||
struct option_cache *oc;
|
||||
int ignorep;
|
||||
--- dhcp-3.0.5/common/alloc.c.libdhcp4client 2006-11-13 22:25:37.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/alloc.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -48,7 +48,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- int size;
|
||||
struct option_chain_head *h;
|
||||
|
||||
if (!ptr) {
|
||||
@@ -109,7 +108,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- int i;
|
||||
struct option_chain_head *option_chain_head;
|
||||
pair car, cdr;
|
||||
|
||||
@@ -161,7 +159,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- int size;
|
||||
struct group *g;
|
||||
|
||||
if (!ptr) {
|
||||
@@ -222,7 +219,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- int i;
|
||||
struct group *group;
|
||||
|
||||
if (!ptr || !*ptr) {
|
||||
@@ -745,8 +741,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- struct buffer *bp;
|
||||
-
|
||||
if (!ptr) {
|
||||
log_error ("%s(%d): null pointer", file, line);
|
||||
#if defined (POINTER_DEBUG)
|
||||
@@ -834,8 +828,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- struct dns_host_entry *bp;
|
||||
-
|
||||
if (!ptr || !*ptr) {
|
||||
log_error ("%s(%d): null pointer", file, line);
|
||||
#if defined (POINTER_DEBUG)
|
||||
@@ -1016,9 +1008,11 @@
|
||||
rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
|
||||
return 1;
|
||||
}
|
||||
@ -458,9 +653,25 @@
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) || \
|
||||
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
||||
void relinquish_free_packets ()
|
||||
--- dhcp-3.0.5/common/discover.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/discover.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -120,7 +120,9 @@
|
||||
@@ -1037,7 +1031,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- int size;
|
||||
struct packet *p;
|
||||
|
||||
if (!ptr) {
|
||||
@@ -1157,7 +1150,6 @@
|
||||
const char *file;
|
||||
int line;
|
||||
{
|
||||
- int size;
|
||||
struct dns_zone *d;
|
||||
|
||||
if (!ptr) {
|
||||
--- dhcp-3.0.5/common/discover.c.libdhcp4client 2006-11-13 22:25:37.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/discover.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -120,28 +120,30 @@
|
||||
For each interface that's of type INET and not the loopback interface,
|
||||
register that interface with the network I/O software, figure out what
|
||||
subnet it's on, and add it to the list of interfaces. */
|
||||
@ -471,7 +682,20 @@
|
||||
void discover_interfaces (state)
|
||||
int state;
|
||||
{
|
||||
@@ -140,8 +142,10 @@
|
||||
- struct interface_info *tmp, *ip;
|
||||
+ struct interface_info *tmp;
|
||||
struct interface_info *last, *next;
|
||||
char buf [2048];
|
||||
struct ifconf ic;
|
||||
struct ifreq ifr;
|
||||
int i;
|
||||
int sock;
|
||||
- int address_count = 0;
|
||||
struct subnet *subnet;
|
||||
- struct shared_network *share;
|
||||
struct sockaddr_in foo;
|
||||
int ir;
|
||||
struct ifreq *tif;
|
||||
#ifdef ALIAS_NAMES_PERMUTED
|
||||
char *s;
|
||||
#endif
|
||||
@ -483,7 +707,15 @@
|
||||
int wifcount = 0;
|
||||
|
||||
/* Create an unbound datagram socket to do the SIOCGIFADDR ioctl on. */
|
||||
@@ -694,12 +698,17 @@
|
||||
@@ -435,7 +437,6 @@
|
||||
for (tmp = interfaces; tmp; tmp = tmp -> next) {
|
||||
struct ifreq ifr;
|
||||
struct sockaddr sa;
|
||||
- int b, sk;
|
||||
|
||||
if (!tmp -> ifp) {
|
||||
/* Make up an ifreq structure. */
|
||||
@@ -694,12 +695,17 @@
|
||||
log_info ("%s", "");
|
||||
log_fatal ("Not configured to listen on any interfaces!");
|
||||
}
|
||||
@ -503,9 +735,43 @@
|
||||
#if defined (HAVE_SETFD)
|
||||
if (fallback_interface) {
|
||||
if (fcntl (fallback_interface -> rfdesc, F_SETFD, 1) < 0)
|
||||
@@ -815,7 +821,6 @@
|
||||
{
|
||||
struct interface_info *interface;
|
||||
isc_result_t status;
|
||||
- int foo;
|
||||
|
||||
if (h -> type != dhcp_type_interface)
|
||||
return ISC_R_INVALIDARG;
|
||||
@@ -858,7 +863,6 @@
|
||||
const char *file, int line)
|
||||
{
|
||||
struct interface_info *interface;
|
||||
- isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_interface)
|
||||
return ISC_R_INVALIDARG;
|
||||
@@ -888,8 +892,6 @@
|
||||
const char *name, va_list ap)
|
||||
{
|
||||
struct interface_info *ip, *interface;
|
||||
- struct client_config *config;
|
||||
- struct client_state *client;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_interface)
|
||||
--- dhcp-3.0.5/common/lpf.c.libdhcp4client 2004-11-24 12:39:15.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/lpf.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -216,6 +216,7 @@
|
||||
+++ dhcp-3.0.5/common/lpf.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -69,8 +69,6 @@
|
||||
struct interface_info *info;
|
||||
{
|
||||
int sock;
|
||||
- char filename[50];
|
||||
- int b;
|
||||
struct sockaddr sa;
|
||||
|
||||
/* Make an LPF socket. */
|
||||
@@ -216,6 +214,7 @@
|
||||
struct interface_info *info;
|
||||
{
|
||||
struct sock_fprog p;
|
||||
@ -513,8 +779,16 @@
|
||||
|
||||
/* Set up the bpf filter program structure. This is defined in
|
||||
bpf.c */
|
||||
@@ -334,7 +333,6 @@
|
||||
struct sockaddr_in *from;
|
||||
struct hardware *hfrom;
|
||||
{
|
||||
- int nread;
|
||||
int length = 0;
|
||||
int offset = 0;
|
||||
unsigned char ibuf [1536];
|
||||
--- dhcp-3.0.5/dst/hmac_link.c.libdhcp4client 2001-02-22 02:22:08.000000000 -0500
|
||||
+++ dhcp-3.0.5/dst/hmac_link.c 2006-11-10 11:58:30.000000000 -0500
|
||||
+++ dhcp-3.0.5/dst/hmac_link.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -38,6 +38,10 @@
|
||||
|
||||
#include "dst_internal.h"
|
||||
@ -602,7 +876,7 @@
|
||||
return (0);
|
||||
memset(dst_t_func[KEY_HMAC_MD5], 0, sizeof(struct dst_func));
|
||||
--- dhcp-3.0.5/omapip/alloc.c.libdhcp4client 2006-02-22 17:43:27.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/alloc.c 2006-11-10 11:58:30.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/alloc.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -40,6 +40,41 @@
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
@ -645,7 +919,15 @@
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
|
||||
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
||||
struct dmalloc_preamble *dmalloc_list;
|
||||
@@ -78,7 +113,9 @@
|
||||
@@ -66,7 +101,6 @@
|
||||
{
|
||||
unsigned char *foo;
|
||||
unsigned len;
|
||||
- int i;
|
||||
VOIDPTR *bar;
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
|
||||
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
||||
@@ -78,7 +112,9 @@
|
||||
return (VOIDPTR)0;
|
||||
|
||||
foo = malloc(len);
|
||||
@ -656,7 +938,7 @@
|
||||
if (!foo)
|
||||
return (VOIDPTR)0;
|
||||
bar = (VOIDPTR)(foo + DMDOFFSET);
|
||||
@@ -200,6 +237,9 @@
|
||||
@@ -200,6 +236,9 @@
|
||||
0, (unsigned char *)ptr + DMDOFFSET, 0, 1, RC_MALLOC);
|
||||
#endif
|
||||
free (ptr);
|
||||
@ -666,8 +948,8 @@
|
||||
}
|
||||
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
|
||||
--- dhcp-3.0.5/omapip/dispatch.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/dispatch.c 2006-11-10 11:58:30.000000000 -0500
|
||||
--- dhcp-3.0.5/omapip/dispatch.c.libdhcp4client 2006-11-13 22:25:37.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/dispatch.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
@ -677,8 +959,8 @@
|
||||
TIME cur_time;
|
||||
|
||||
OMAPI_OBJECT_ALLOC (omapi_io,
|
||||
--- dhcp-3.0.5/omapip/errwarn.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/errwarn.c 2006-11-10 11:58:30.000000000 -0500
|
||||
--- dhcp-3.0.5/omapip/errwarn.c.libdhcp4client 2006-11-13 22:25:37.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/errwarn.c 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -39,6 +39,11 @@
|
||||
#include <omapip/omapip_p.h>
|
||||
#include <errno.h>
|
||||
@ -801,7 +1083,7 @@
|
||||
}
|
||||
|
||||
--- dhcp-3.0.5/configure.libdhcp4client 2004-09-10 17:02:30.000000000 -0400
|
||||
+++ dhcp-3.0.5/configure 2006-11-10 11:58:30.000000000 -0500
|
||||
+++ dhcp-3.0.5/configure 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -246,7 +246,7 @@
|
||||
fi
|
||||
|
||||
@ -811,9 +1093,9 @@
|
||||
fi
|
||||
|
||||
for foo in $dirs; do
|
||||
--- /dev/null 2006-11-10 10:29:00.408684247 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/Makefile.dist 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -0,0 +1,86 @@
|
||||
--- /dev/null 2006-11-12 08:14:14.401605657 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/Makefile.dist 2006-11-13 22:25:58.000000000 -0500
|
||||
@@ -0,0 +1,104 @@
|
||||
+# Makefile.dist for libdhcp4client
|
||||
+#
|
||||
+# We get the libdhcp4client library from the patched ISC source code. We
|
||||
@ -827,11 +1109,21 @@
|
||||
+PROGS = libdhcp4client.a libdhcp4client.so.1
|
||||
+HDRS = dhcp4client.h libdhcp_control.h
|
||||
+SRCS = client_dhclient.c common_alloc.c common_discover.c dst_hmac_link.c \
|
||||
+ omapip_alloc.c omapip_errwarn.c
|
||||
+OBJS = client_dhclient.o common_alloc.o common_discover.o dst_hmac_link.o \
|
||||
+ omapip_alloc.o omapip_errwarn.o
|
||||
+ omapip_alloc.c omapip_errwarn.c common_tables.c common_options.c \
|
||||
+ common_dispatch.c common_tree.c omapip_hash.c omapip_dispatch.c \
|
||||
+ omapip_support.c omapip_trace.c common_ctrace.c common_print.c \
|
||||
+ common_socket.c common_inet.c omapip_auth.c omapip_buffer.c \
|
||||
+ omapip_connection.c omapip_generic.c omapip_array.c omapip_listener.c \
|
||||
+ omapip_message.c omapip_protocol.c omapip_toisc.c omapip_mrtrace.c \
|
||||
+ client_clparse.c common_memory.c omapip_convert.c common_parse.c \
|
||||
+ common_conflex.c common_bpf.c common_dlpi.c common_lpf.c common_nit.c \
|
||||
+ common_upf.c common_packet.c common_dns.c common_comapi.c \
|
||||
+ dst_dst_api.c dst_base64.c common_ethernet.c common_tr.c \
|
||||
+ dst_dst_support.c common_execute.c omapip_result.c omapip_handle.c \
|
||||
+ dst_prandom.c
|
||||
+
|
||||
+INCLUDES = -I$(TOP)/includes -I.
|
||||
+OBJS = $(SRCS:.c=.o)
|
||||
+INCLUDES = -I$(TOP) -I$(TOP)/includes -I$(TOP)/dst -I.
|
||||
+CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) \
|
||||
+ -DCLIENT_PATH=${CLIENT_PATH} -DLIBDHCP
|
||||
+
|
||||
@ -889,19 +1181,27 @@
|
||||
+ ln -s $(TOP)/libdhcp4client/$$hdr $$hdr; \
|
||||
+ done
|
||||
+
|
||||
+# minires is difficult to build because it overrides things in common and dst,
|
||||
+# so we just link with the already built libres.a since we need it all anyway
|
||||
+libres.a:
|
||||
+ if [ ! -f ../minires/$@ ]; then \
|
||||
+ $(MAKE) -C ../minires; \
|
||||
+ fi; \
|
||||
+ ln ../minires/libres.a .; \
|
||||
+ $(AR) x libres.a
|
||||
+
|
||||
+# minires/res_query.o contains an undefined symbol __h_errno_set, is not
|
||||
+# used by any dhcp code, and is optimized out by the linker when producing
|
||||
+# the dhclient executable or a shared library
|
||||
+libdhcp4client.a: $(OBJS) libres.a
|
||||
+ $(AR) crus $@ $(OBJS) `$(AR) t libres.a`
|
||||
+
|
||||
+libdhcp4client.a: $(OBJS)
|
||||
+ $(AR) crus $@ $(OBJS)
|
||||
+
|
||||
+libdhcp4client.so.1: $(OBJS)
|
||||
+ $(CC) -shared -o $@ -Wl,-soname,$@ $^
|
||||
+libdhcp4client.so.1: $(OBJS) libres.a
|
||||
+ $(CC) -shared -o $@ -Wl,-soname,$@ $(OBJS) `$(AR) t libres.a`
|
||||
+
|
||||
+# Dependencies (semi-automatically-generated)
|
||||
--- /dev/null 2006-11-10 10:29:00.408684247 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/dhcp4client.h 2006-11-10 11:58:30.000000000 -0500
|
||||
--- /dev/null 2006-11-12 08:14:14.401605657 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/dhcp4client.h 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* dhcp4client.h
|
||||
+ *
|
||||
@ -927,8 +1227,8 @@
|
||||
+extern int dhcpv4_client( struct libdhcp_control_s *dhc_ctl, int argc, char **argv, char **envp);
|
||||
+ /* The ISC IPv4 DHCP client main() function .
|
||||
+ */
|
||||
--- /dev/null 2006-11-10 10:29:00.408684247 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/libdhcp_control.h 2006-11-10 11:58:30.000000000 -0500
|
||||
--- /dev/null 2006-11-12 08:14:14.401605657 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/libdhcp_control.h 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -0,0 +1,102 @@
|
||||
+/* libdhcp_control.h
|
||||
+ *
|
||||
@ -1033,7 +1333,7 @@
|
||||
+
|
||||
+#endif
|
||||
--- dhcp-3.0.5/Makefile.dist.libdhcp4client 2004-06-10 13:59:10.000000000 -0400
|
||||
+++ dhcp-3.0.5/Makefile.dist 2006-11-10 11:58:30.000000000 -0500
|
||||
+++ dhcp-3.0.5/Makefile.dist 2006-11-13 22:25:37.000000000 -0500
|
||||
@@ -22,7 +22,7 @@
|
||||
# http://www.isc.org/
|
||||
|
||||
|
48
dhcp.spec
48
dhcp.spec
@ -8,7 +8,7 @@
|
||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent.
|
||||
Name: dhcp
|
||||
Version: 3.0.5
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 12
|
||||
License: distributable
|
||||
Group: System Environment/Daemons
|
||||
@ -99,19 +99,48 @@ client library .
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
# Extended new option info patch. Adds the -x option to dhclient, which is
|
||||
# needed for dhcdbd and NetworkManager
|
||||
%patch0 -p1 -b .enoi
|
||||
|
||||
# Build fixes
|
||||
%patch1 -p1 -b .Makefile
|
||||
|
||||
# Add -RedHat to the version number
|
||||
%patch2 -p1 -b .version
|
||||
|
||||
# Patches for the client/ subdirectory
|
||||
%patch3 -p1 -b .client
|
||||
|
||||
# Patches for the common/ subdirectory
|
||||
%patch4 -p1 -b .common
|
||||
|
||||
# Patches for the dhcpctl/ subdirectory
|
||||
%patch5 -p1 -b .dhcpctl
|
||||
|
||||
# Patches for the dst/ subdirectory
|
||||
%patch6 -p1 -b .dst
|
||||
|
||||
# Patches for the includes/ subdirectory
|
||||
%patch7 -p1 -b .includes
|
||||
|
||||
# Patches for the omapip/ subdirectory
|
||||
%patch8 -p1 -b .omapip
|
||||
|
||||
# Patches for the minires/ subdirectory
|
||||
%patch9 -p1 -b .minires
|
||||
|
||||
# Patches for the server/ subdirectory
|
||||
%patch10 -p1 -b .server
|
||||
|
||||
# Add the libdhcp4client target (library version of dhclient)
|
||||
%patch11 -p1 -b .libdhcp4client
|
||||
|
||||
# Fix up timeout handling in dhclient and libdhcp4client
|
||||
%patch12 -p1 -b .timeouts
|
||||
|
||||
# Fix up anything that fails -Wall -Werror
|
||||
%patch13 -p1 -b .warnings
|
||||
|
||||
%build
|
||||
@ -174,13 +203,6 @@ cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-options.5 $RPM_BUILD_ROOT%{_mandir}/m
|
||||
cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-eval.5 $RPM_BUILD_ROOT%{_mandir}/man5/dhcpd-eval.5
|
||||
cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-eval.5 $RPM_BUILD_ROOT%{_mandir}/man5/dhclient-eval.5
|
||||
|
||||
# Why not ship the doc/ documentation? Some of it is quite useful.
|
||||
# Also generate DHCP options tables for C, perl, python:
|
||||
/usr/bin/perl %SOURCE6 > doc/dhcp_options.h
|
||||
/usr/bin/perl %SOURCE6 -pe > doc/dhcp_options.pl
|
||||
/usr/bin/perl %SOURCE6 -py > doc/dhcp_options.py
|
||||
/usr/bin/perl %SOURCE6 -d > doc/dhcp_options.txt
|
||||
|
||||
# Install default (empty) dhcpd.conf:
|
||||
cp -fp %SOURCE4 $RPM_BUILD_ROOT/etc
|
||||
|
||||
@ -318,6 +340,16 @@ exit 0
|
||||
%{_libdir}/libdhcp4client.so
|
||||
|
||||
%changelog
|
||||
* Mon Nov 13 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-4
|
||||
- Enable relinquish_timeouts() and cancel_all_timeouts() even when
|
||||
DEBUG_MEMORY_LEAKAGE_ON_EXIT is not defined
|
||||
- Add prototypes for b64_pton() and b64_ntop in dst/
|
||||
- Move variable declarations and labels around in the fix-warnings patch
|
||||
- Expand the list of objects needed for libdhcp4client (#215328)
|
||||
- Use libres.a in libdhcp4client since it gives correct minires objects
|
||||
- Remove the dhcp options table in C, Perl, Python, and text format (these
|
||||
were reference files added to /usr/share/doc)
|
||||
|
||||
* Mon Nov 13 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-3
|
||||
- Remove struct universe *universe from envadd_state in the client patch
|
||||
- Add struct universe *universe to envadd_state in the enoi patch
|
||||
|
Loading…
Reference in New Issue
Block a user