Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
4bd8800e
Commit
4bd8800e
authored
Jan 26, 2000
by
Ted Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors introduced in the last set of checkins.
parent
3c0b59d3
Changes
57
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
3514 additions
and
3005 deletions
+3514
-3005
client/clparse.c
client/clparse.c
+3
-4
client/dhclient.8
client/dhclient.8
+1
-1
client/dhclient.c
client/dhclient.c
+2
-9
client/dhclient.cat8
client/dhclient.cat8
+1
-1
client/dhclient.conf.5
client/dhclient.conf.5
+1
-1
client/dhclient.conf.cat5
client/dhclient.conf.cat5
+1
-1
common/Makefile.dist
common/Makefile.dist
+2
-2
common/alloc.c
common/alloc.c
+39
-329
common/bpf.c
common/bpf.c
+2
-2
common/conflex.c
common/conflex.c
+6
-6
common/dhcp-options.cat5
common/dhcp-options.cat5
+709
-445
common/discover.c
common/discover.c
+10
-11
common/dispatch.c
common/dispatch.c
+3
-2
common/dns.c
common/dns.c
+11
-11
common/execute.c
common/execute.c
+55
-68
common/hash.c
common/hash.c
+4
-4
common/icmp.c
common/icmp.c
+2
-2
common/memory.c
common/memory.c
+6
-5
common/options.c
common/options.c
+6
-4
common/parse.c
common/parse.c
+170
-182
common/print.c
common/print.c
+13
-5
common/resolv.c
common/resolv.c
+4
-5
common/tables.c
common/tables.c
+2
-3
common/tree.c
common/tree.c
+76
-62
dhcpctl/callback.c
dhcpctl/callback.c
+10
-10
dhcpctl/dhcpctl.c
dhcpctl/dhcpctl.c
+47
-57
dhcpctl/dhcpctl.h
dhcpctl/dhcpctl.h
+3
-3
dhcpctl/remote.c
dhcpctl/remote.c
+30
-41
dhcpctl/test.c
dhcpctl/test.c
+5
-5
includes/arpa/nameser.h
includes/arpa/nameser.h
+488
-169
includes/arpa/nameser_compat.h
includes/arpa/nameser_compat.h
+229
-0
includes/dhcpd.h
includes/dhcpd.h
+31
-104
includes/omapip/alloc.h
includes/omapip/alloc.h
+62
-3
includes/omapip/omapip.h
includes/omapip/omapip.h
+59
-29
includes/site.h
includes/site.h
+3
-3
omapip/Makefile.dist
omapip/Makefile.dist
+2
-2
omapip/alloc.c
omapip/alloc.c
+286
-23
omapip/buffer.c
omapip/buffer.c
+16
-33
omapip/connection.c
omapip/connection.c
+18
-24
omapip/dispatch.c
omapip/dispatch.c
+26
-34
omapip/errwarn.c
omapip/errwarn.c
+13
-66
omapip/generic.c
omapip/generic.c
+24
-32
omapip/handle.c
omapip/handle.c
+6
-6
omapip/listener.c
omapip/listener.c
+22
-30
omapip/message.c
omapip/message.c
+16
-21
omapip/protocol.c
omapip/protocol.c
+51
-74
omapip/support.c
omapip/support.c
+65
-66
omapip/test.c
omapip/test.c
+2
-2
relay/dhcrelay.c
relay/dhcrelay.c
+5
-11
server/confpars.c
server/confpars.c
+4
-3
server/db.c
server/db.c
+2
-2
server/dhcp.c
server/dhcp.c
+122
-122
server/dhcpd.c
server/dhcpd.c
+19
-29
server/dhcpd.conf.cat5
server/dhcpd.conf.cat5
+490
-556
server/failover.c
server/failover.c
+70
-97
server/mdb.c
server/mdb.c
+28
-32
server/omapi.c
server/omapi.c
+131
-151
No files found.
client/clparse.c
View file @
4bd8800e
...
...
@@ -3,7 +3,7 @@
Parser for dhclient config and lease files... */
/*
* Copyright (c) 1996-
1999
Internet Software Consortium.
* Copyright (c) 1996-
2000
Internet Software Consortium.
* Use is subject to license terms which appear in the file named
* ISC-LICENSE that should have accompanied this file when you
* received it. If a file named ISC-LICENSE did not accompany this
...
...
@@ -22,7 +22,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: clparse.c,v 1.4
0 2000/01/25 00:58:02
mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: clparse.c,v 1.4
1 2000/01/26 14:55:26
mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -302,8 +302,7 @@ void parse_client_statement (cfile, ip, config)
return
;
for
(;
*
p
;
p
=
&
((
*
p
)
->
next
))
;
executable_statement_reference
(
p
,
stmt
,
"parse_client_statement"
);
executable_statement_reference
(
p
,
stmt
,
MDL
);
stmt
->
next
=
(
struct
executable_statement
*
)
0
;
return
;
...
...
client/dhclient.8
View file @
4bd8800e
...
...
@@ -92,7 +92,7 @@ dhclient.leases file. In order to prevent the file from becoming
arbitrarily large, from time to time dhclient creates a new
dhclient.leases file from its in-core lease database. The old version
of the dhclient.leases file is retained under the name
.IR dhc
pd
.leases~
.IR dhc
lient
.leases~
until the next time dhclient rewrites the database.
.PP
Old leases are kept around in case the DHCP server is unavailable when
...
...
client/dhclient.c
View file @
4bd8800e
...
...
@@ -3,7 +3,7 @@
DHCP Client. */
/*
* Copyright (c) 1996-
1999
Internet Software Consortium.
* Copyright (c) 1996-
2000
Internet Software Consortium.
* Use is subject to license terms which appear in the file named
* ISC-LICENSE that should have accompanied this file when you
* received it. If a file named ISC-LICENSE did not accompany this
...
...
@@ -29,7 +29,7 @@
#ifndef lint
static
char
ocopyright
[]
=
"$Id: dhclient.c,v 1.9
2 2000/01/25 00:58:57
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: dhclient.c,v 1.9
3 2000/01/26 14:55:26
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -47,8 +47,6 @@ int dhcp_max_agent_option_packet_length = 0;
int
interfaces_requested
=
0
;
int
log_perror
=
1
;
struct
iaddr
iaddr_broadcast
=
{
4
,
{
255
,
255
,
255
,
255
}
};
struct
iaddr
iaddr_any
=
{
4
,
{
0
,
0
,
0
,
0
}
};
struct
in_addr
inaddr_any
;
...
...
@@ -70,7 +68,6 @@ static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.htm
u_int16_t
local_port
;
u_int16_t
remote_port
;
int
log_priority
;
int
no_daemon
;
int
save_scripts
;
...
...
@@ -325,10 +322,6 @@ static void usage ()
"[-cf config-file] [interface]"
);
}
void
cleanup
()
{
}
struct
class
*
find_class
(
s
)
const
char
*
s
;
{
...
...
client/dhclient.cat8
View file @
4bd8800e
...
...
@@ -49,7 +49,7 @@ OOPPEERRAATTIIOONN
dhclient creates a new dhclient.leases file from its in-
core lease database. The old version of the
dhclient.leases file is retained under the name
_d_h_c_
p_d_._l_e_a_s_e_s_~ until the next time dhclient rewrites
the
_d_h_c_
l_i_e_n_t_._l_e_a_s_e_s_~ until the next time dhclient rewrites
the
database.
Old leases are kept around in case the DHCP server is
...
...
client/dhclient.conf.5
View file @
4bd8800e
...
...
@@ -366,7 +366,7 @@ interface's final configuration once a lease has been acquired. If
no lease is acquired, the script is used to test predefined leases, if
any, and also called once if no valid lease can be identified. For
more information, see
.B dhclient-
lease
(8).
.B dhclient-
script
(8).
.PP
\fBmedium "\fImedia setup\fB";\fR
.PP
...
...
client/dhclient.conf.cat5
View file @
4bd8800e
...
...
@@ -375,7 +375,7 @@ dhclient.conf(5) dhclient.conf(5)
If no lease is acquired, the script is used to test prede
fined leases, if any, and also called once if no valid
lease can be identified. For more information, see
ddhhcclliieenntt--
lleeaassee
((88))..
ddhhcclliieenntt--
ssccrriipptt
((88))..
mmeeddiiuumm ""_m_e_d_i_a _s_e_t_u_p"";;
...
...
common/Makefile.dist
View file @
4bd8800e
...
...
@@ -21,11 +21,11 @@ CATMANPAGES = dhcp-options.cat5 dhcp-contrib.cat5 dhcp-eval.cat5
SEDMANPAGES
=
dhcp-options.man5 dhcp-contrib.man5 dhcp-eval.man5
SRC
=
raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c
\
lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c
\
inet.c convert.c tree.c tables.c hash.c alloc.c
errwarn.c
\
inet.c convert.c tree.c tables.c hash.c alloc.c
\
inet_addr.c dns.c resolv.c execute.c discover.c auth.c
OBJ
=
raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o
\
lpf.o dlpi.o packet.o tr.o ethernet.o memory.o print.o options.o
\
inet.o convert.o tree.o tables.o hash.o alloc.o
errwarn.o
\
inet.o convert.o tree.o tables.o hash.o alloc.o
\
inet_addr.o dns.o resolv.o execute.o discover.o auth.o
MAN
=
dhcp-options.5 dhcp-contrib.5 dhcp-eval.5
...
...
common/alloc.c
View file @
4bd8800e
...
...
@@ -22,280 +22,15 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: alloc.c,v 1.3
7 2000/01/25 01:02:26
mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: alloc.c,v 1.3
8 2000/01/26 14:55:33
mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
#include <omapip/omapip_p.h>
struct
dhcp_packet
*
dhcp_free_list
;
struct
packet
*
packet_free_list
;
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
struct
dmalloc_preamble
*
dmalloc_list
;
unsigned
long
dmalloc_outstanding
;
unsigned
long
dmalloc_longterm
;
unsigned
long
dmalloc_generation
;
unsigned
long
dmalloc_cutoff_generation
;
#endif
#if defined (DEBUG_RC_HISTORY)
struct
rc_history_entry
rc_history
[
RC_HISTORY_MAX
];
int
rc_history_index
;
#endif
VOIDPTR
dmalloc
(
size
,
file
,
line
)
unsigned
size
;
const
char
*
file
;
int
line
;
{
unsigned
char
*
foo
=
malloc
(
size
+
DMDSIZE
);
int
i
;
VOIDPTR
*
bar
;
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
struct
dmalloc_preamble
*
dp
;
#endif
if
(
!
foo
)
{
log_error
(
"No memory for %s."
,
name
);
return
(
VOIDPTR
)
0
;
}
bar
=
(
VOIDPTR
)(
foo
+
DMDOFFSET
);
memset
(
bar
,
0
,
size
);
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
dp
=
(
struct
dmalloc_preamble
*
)
foo
;
dp
->
prev
=
dmalloc_list
;
if
(
dmalloc_list
)
dmalloc_list
->
next
=
dp
;
dmalloc_list
=
dp
;
dp
->
next
=
(
struct
dmalloc_preamble
*
)
0
;
dp
->
size
=
size
;
dp
->
file
=
file
;
dp
->
line
=
line
;
dp
->
generation
=
dmalloc_generation
++
;
dmalloc_outstanding
+=
size
;
for
(
i
=
0
;
i
<
DMLFSIZE
;
i
++
)
dp
->
low_fence
[
i
]
=
(((
unsigned
long
)
(
&
dp
->
low_fence
[
i
]))
%
143
)
+
113
;
for
(
i
=
DMDOFFSET
;
i
<
DMDSIZE
;
i
++
)
foo
[
i
+
size
]
=
(((
unsigned
long
)
(
&
foo
[
i
+
size
]))
%
143
)
+
113
;
#if defined (DEBUG_MALLOC_POOL_EXHAUSTIVELY)
/* Check _every_ entry in the pool! Very expensive. */
for
(
dp
=
dmalloc_list
;
dp
;
dp
=
dp
->
prev
)
{
for
(
i
=
0
;
i
<
DMLFSIZE
;
i
++
)
{
if
(
dp
->
low_fence
[
i
]
!=
(((
unsigned
long
)
(
&
dp
->
low_fence
[
i
]))
%
143
)
+
113
)
{
log_error
(
"malloc fence modified: %s(%d)"
,
dp
->
file
,
dp
->
line
);
abort
();
}
}
foo
=
(
unsigned
char
*
)
dp
;
for
(
i
=
DMDOFFSET
;
i
<
DMDSIZE
;
i
++
)
{
if
(
foo
[
i
+
dp
->
size
]
!=
(((
unsigned
long
)
(
&
foo
[
i
+
dp
->
size
]))
%
143
)
+
113
)
{
log_error
(
"malloc fence modified: %s(%d)"
,
dp
->
file
,
dp
->
line
);
abort
();
}
}
}
#endif
#endif
return
bar
;
}
void
dfree
(
ptr
,
file
,
line
)
VOIDPTR
ptr
;
const
char
*
file
;
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"dfree %s(%d): free on null pointer."
,
file
,
line
);
return
;
}
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
{
unsigned
char
*
bar
=
ptr
;
struct
dmalloc_preamble
*
dp
,
*
cur
;
int
i
;
bar
-=
DMDOFFSET
;
cur
=
(
struct
dmalloc_preamble
*
)
bar
;
for
(
dp
=
dmalloc_list
;
dp
;
dp
=
dp
->
prev
)
if
(
dp
==
cur
)
break
;
if
(
!
dp
)
{
log_error
(
"%s(%d): freeing unknown memory: %lx"
,
dp
->
file
,
dp
->
line
,
(
unsigned
long
)
cur
);
abort
();
}
if
(
dp
->
prev
)
dp
->
prev
->
next
=
dp
->
next
;
if
(
dp
->
next
)
dp
->
next
->
prev
=
dp
->
prev
;
if
(
dp
==
dmalloc_list
)
dmalloc_list
=
dp
->
prev
;
if
(
dp
->
generation
>=
dmalloc_cutoff_generation
)
dmalloc_outstanding
-=
dp
->
size
;
else
dmalloc_longterm
-=
dp
->
size
;
for
(
i
=
0
;
i
<
DMLFSIZE
;
i
++
)
{
if
(
dp
->
low_fence
[
i
]
!=
(((
unsigned
long
)
(
&
dp
->
low_fence
[
i
]))
%
143
)
+
113
)
{
log_error
(
"malloc fence modified: %s(%d)"
,
dp
->
file
,
dp
->
line
);
abort
();
}
}
for
(
i
=
DMDOFFSET
;
i
<
DMDSIZE
;
i
++
)
{
if
(
bar
[
i
+
dp
->
size
]
!=
(((
unsigned
long
)
(
&
bar
[
i
+
dp
->
size
]))
%
143
)
+
113
)
{
log_error
(
"malloc fence modified: %s(%d)"
,
dp
->
file
,
dp
->
line
);
abort
();
}
}
ptr
=
bar
;
}
#endif
free
(
ptr
);
}
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
/* For allocation functions that keep their own free lists, we want to
account for the reuse of the memory. */
void
dmalloc_reuse
(
foo
,
file
,
line
,
justref
)
VOIDPTR
foo
;
const
char
*
file
;
int
line
;
int
justref
;
{
struct
dmalloc_preamble
*
dp
;
/* Get the pointer to the dmalloc header. */
dp
=
foo
;
dp
--
;
/* If we just allocated this and are now referencing it, this
function would almost be a no-op, except that it would
increment the generation count needlessly. So just return
in this case. */
if
(
dp
->
generation
==
dmalloc_generation
)
return
;
/* If this is longterm data, and we just made reference to it,
don't put it on the short-term list or change its name -
we don't need to know about this. */
if
(
dp
->
generation
<
dmalloc_cutoff_generation
&&
justref
)
return
;
/* Take it out of the place in the allocated list where it was. */
if
(
dp
->
prev
)
dp
->
prev
->
next
=
dp
->
next
;
if
(
dp
->
next
)
dp
->
next
->
prev
=
dp
->
prev
;
if
(
dp
==
dmalloc_list
)
dmalloc_list
=
dp
->
prev
;
/* Account for its removal. */
if
(
dp
->
generation
>=
dmalloc_cutoff_generation
)
dmalloc_outstanding
-=
dp
->
size
;
else
dmalloc_longterm
-=
dp
->
size
;
/* Now put it at the head of the list. */
dp
->
prev
=
dmalloc_list
;
if
(
dmalloc_list
)
dmalloc_list
->
next
=
dp
;
dmalloc_list
=
dp
;
dp
->
next
=
(
struct
dmalloc_preamble
*
)
0
;
/* Change the reference location information. */
dp
->
file
=
file
;
dp
->
line
=
line
;
/* Increment the generation. */
dp
->
generation
=
dmalloc_generation
++
;
/* Account for it. */
dmalloc_outstanding
+=
dp
->
size
;
}
void
dmalloc_dump_outstanding
()
{
static
unsigned
long
dmalloc_cutoff_point
;
struct
dmalloc_preamble
*
dp
;
unsigned
char
*
foo
;
int
i
;
if
(
!
dmalloc_cutoff_point
)
dmalloc_cutoff_point
=
dmalloc_cutoff_generation
;
for
(
dp
=
dmalloc_list
;
dp
;
dp
=
dp
->
prev
)
{
if
(
dp
->
generation
<=
dmalloc_cutoff_point
)
break
;
#if defined (DEBUG_MALLOC_POOL)
for
(
i
=
0
;
i
<
DMLFSIZE
;
i
++
)
{
if
(
dp
->
low_fence
[
i
]
!=
(((
unsigned
long
)
(
&
dp
->
low_fence
[
i
]))
%
143
)
+
113
)
{
log_error
(
"malloc fence modified: %s(%d)"
,
dp
->
file
,
dp
->
line
);
abort
();
}
}
foo
=
(
unsigned
char
*
)
dp
;
for
(
i
=
DMDOFFSET
;
i
<
DMDSIZE
;
i
++
)
{
if
(
foo
[
i
+
dp
->
size
]
!=
(((
unsigned
long
)
(
&
foo
[
i
+
dp
->
size
]))
%
143
)
+
113
)
{
log_error
(
"malloc fence modified: %s(%d)"
,
dp
->
file
,
dp
->
line
);
abort
();
}
}
#endif
#if defined (DEBUG_MEMORY_LEAKAGE)
/* Don't count data that's actually on a free list
somewhere. */
if
(
dp
->
file
)
log_info
(
" %s(%d): %d"
,
dp
->
file
,
dp
->
line
,
dp
->
size
);
#endif
}
if
(
dmalloc_list
)
dmalloc_cutoff_point
=
dmalloc_list
->
generation
;
}
#endif
/* DEBUG_MEMORY_LEAKAGE || DEBUG_MALLOC_POOL */
#if defined (DEBUG_RC_HISTORY)
void
dump_rc_history
()
{
int
i
;
i
=
rc_history_index
;
do
{
log_info
(
" referenced by %s(%d): addr = %lx refcnt = %x
\n
"
,
rc_history
[
i
].
file
,
rc_history
[
i
].
line
,
(
unsigned
long
)
rc_history
[
i
].
addr
,
rc_history
[
i
].
refcnt
);
++
i
;
if
(
i
==
RC_HISTORY_MAX
)
i
=
0
;
}
while
(
i
!=
rc_history_index
&&
rc_history
[
i
].
file
);
}
#endif
struct
dhcp_packet
*
new_dhcp_packet
(
file
,
line
)
const
char
*
file
;
int
line
;
...
...
@@ -501,9 +236,9 @@ void free_lease_state (ptr, file, line)
option_state_dereference
(
&
ptr
->
options
,
file
,
line
);
if
(
ptr
->
packet
)
packet_dereference
(
&
ptr
->
packet
,
file
,
line
);
data_string_forget
(
&
state
->
parameter_request_list
,
file
,
line
);
data_string_forget
(
&
state
->
filename
,
file
,
line
);
data_string_forget
(
&
state
->
server_name
,
file
,
line
);
data_string_forget
(
&
ptr
->
parameter_request_list
,
file
,
line
);
data_string_forget
(
&
ptr
->
filename
,
file
,
line
);
data_string_forget
(
&
ptr
->
server_name
,
file
,
line
);
ptr
->
next
=
free_lease_states
;
free_lease_states
=
ptr
;
dmalloc_reuse
(
free_lease_states
,
(
char
*
)
0
,
0
,
0
);
...
...
@@ -690,7 +425,7 @@ void free_pair (foo, file, line)
{
foo
->
cdr
=
free_pairs
;
free_pairs
=
foo
;
dmalloc_reuse
(
free_
expression
s
,
(
char
*
)
0
,
0
,
0
);
dmalloc_reuse
(
free_
pair
s
,
(
char
*
)
0
,
0
,
0
);
}
struct
expression
*
free_expressions
;
...
...
@@ -721,8 +456,7 @@ int expression_reference (ptr, src, file, line)
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"Null pointer in expression_reference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -730,8 +464,7 @@ int expression_reference (ptr, src, file, line)
#endif
}
if
(
*
ptr
)
{
log_error
(
"Non-null pointer in expression_reference (%s)"
,
file
,
line
);
log_error
(
"%s(%d): non-null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -786,8 +519,7 @@ int option_cache_reference (ptr, src, file, line)
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"Null pointer in option_cache_reference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -795,8 +527,7 @@ int option_cache_reference (ptr, src, file, line)
#endif
}
if
(
*
ptr
)
{
log_error
(
"Non-null pointer in option_cache_reference (%s)"
,
file
,
line
);
log_error
(
"%s(%d): non-null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -833,8 +564,7 @@ int buffer_reference (ptr, bp, file, line)
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"Null pointer passed to buffer_reference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -842,8 +572,7 @@ int buffer_reference (ptr, bp, file, line)
#endif
}
if
(
*
ptr
)
{
log_error
(
"Non-null pointer in buffer_reference (%s)"
,
file
,
line
);
log_error
(
"%s(%d): non-null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -865,8 +594,7 @@ int buffer_dereference (ptr, file, line)
struct
buffer
*
bp
;
if
(
!
ptr
)
{
log_error
(
"Null pointer passed to buffer_dereference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -875,8 +603,7 @@ int buffer_dereference (ptr, file, line)
}
if
(
!*
ptr
)
{
log_error
(
"Null pointer in buffer_dereference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -885,11 +612,11 @@ int buffer_dereference (ptr, file, line)
}
(
*
ptr
)
->
refcnt
--
;
rc_register
(
nam
e
,
line
,
*
ptr
,
(
*
ptr
)
->
refcnt
);
rc_register
(
fil
e
,
line
,
*
ptr
,
(
*
ptr
)
->
refcnt
);
if
(
!
(
*
ptr
)
->
refcnt
)
dfree
((
*
ptr
),
file
,
line
);
if
((
*
ptr
)
->
refcnt
<
0
)
{
log_error
(
"
buffer_dereference: negative refcnt!"
);
log_error
(
"
%s(%d): negative refcnt!"
,
file
,
line
);
#if defined (DEBUG_RC_HISTORY)
dump_rc_history
();
#endif
...
...
@@ -927,8 +654,7 @@ int dns_host_entry_reference (ptr, bp, file, line)
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"Null pointer in dns_host_entry_reference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -936,8 +662,7 @@ int dns_host_entry_reference (ptr, bp, file, line)
#endif
}
if
(
*
ptr
)
{
log_error
(
"Non-null pointer in dns_host_entry_reference (%s)"
,
file
,
line
);
log_error
(
"%s(%d): non-null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -959,8 +684,7 @@ int dns_host_entry_dereference (ptr, file, line)
struct
dns_host_entry
*
bp
;
if
(
!
ptr
||
!*
ptr
)
{
log_error
(
"Null pointer in dns_host_entry_dereference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -973,7 +697,7 @@ int dns_host_entry_dereference (ptr, file, line)
if
(
!
(
*
ptr
)
->
refcnt
)
dfree
((
*
ptr
),
file
,
line
);
if
((
*
ptr
)
->
refcnt
<
0
)
{
log_error
(
"
dns_host_entry_dereference: negative refcnt!"
);
log_error
(
"
%s(%d): negative refcnt!"
,
file
,
line
);
#if defined (DEBUG_RC_HISTORY)
dump_rc_history
();
#endif
...
...
@@ -995,8 +719,7 @@ int option_state_allocate (ptr, file, line)
unsigned
size
;
if
(
!
ptr
)
{
log_error
(
"Null pointer passed to option_state_allocate: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -1004,8 +727,7 @@ int option_state_allocate (ptr, file, line)
#endif
}
if
(
*
ptr
)
{
log_error
(
"Non-null pointer in option_state_allocate (%s)"
,
file
,
line
);
log_error
(
"%s(%d): non-null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -1032,8 +754,7 @@ int option_state_reference (ptr, bp, file, line)
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"Null pointer in option_state_reference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -1041,8 +762,7 @@ int option_state_reference (ptr, bp, file, line)
#endif
}
if
(
*
ptr
)
{
log_error
(
"Non-null pointer in option_state_reference (%s)"
,
file
,
line
);
log_error
(
"%s(%d): non-null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -1065,8 +785,7 @@ int option_state_dereference (ptr, file, line)
struct
option_state
*
options
;
if
(
!
ptr
||
!*
ptr
)
{
log_error
(
"Null pointer in option_state_dereference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)
abort
();
#else
...
...
@@ -1082,7 +801,7 @@ int option_state_dereference (ptr, file, line)
return
1
;
if
(
options
->
refcnt
<
0
)
{
log_error
(
"
option_state_dereference: negative refcnt!"
);
log_error
(
"
%s(%d): negative refcnt!"
,
file
,
line
);
#if defined (DEBUG_RC_HISTORY)
dump_rc_history
();
#endif
...
...
@@ -1125,8 +844,7 @@ int executable_statement_reference (ptr, bp, file, line)
int
line
;
{
if
(
!
ptr
)
{
log_error
(
"Null ptr in executable_statement_reference: %s"
,
file
,
line
);
log_error
(
"%s(%d): null pointer"
,
file
,
line
);
#if defined (POINTER_DEBUG)