*** From dhcp-server -- To unsubscribe, see the end of this message. ***
>> Apr 23 18:21:20 arachne dhcpd: Non-null pointer in buffer_reference
>(evaluate_option_cache)
>
>This could be the DHCPINFORM core dump that was fixed in 19990424, but
>if so, that would only have gotten you a little bit further - you'll
>need to apply the patch included below. In order to be sure this is
>fixed, we need a core dump, so we'll just have to wait. Sigh.
Alright, it happened again, with 19990424 and the patch you sent.
This time I have a core dump. It says:
--------8<--------8<--------8<--------8<--------8<--------8<--------
(gdb) where
#0 0x4002b0e1 in __kill () at soinit.c:27
#1 0x4002af0f in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x4002c1ab in abort () at ../sysdeps/generic/abort.c:83
#3 0x806677e in buffer_reference (ptr=0xbfffe1b8, bp=0x80a6e60,
name=0x806bd10 "evaluate_option_cache") at alloc.c:553
#4 0x8064f9e in data_string_copy (dest=0xbfffe1b8, src=0x80a2168,
name=0x806bd10 "evaluate_option_cache") at tree.c:1092
#5 0x8064b61 in evaluate_option_cache (result=0xbfffe1b8, packet=0xbfffe600,
options=0x80a3390, oc=0x80a2158) at tree.c:921
#6 0x804a9f0 in dhcpinform (packet=0xbfffe600) at dhcp.c:417
#7 0x8049de9 in dhcp (packet=0xbfffe600) at dhcp.c:61
#8 0x8061c77 in do_packet (interface=0x807d9e0, packet=0xbfffe6a8, len=300,
from_port=17408, from={len = 4, iabuf = "��Fs\000�\000@P�\000@\234���"},
hfrom=0xbffff6c0) at options.c:817
#9 0x80681ed in got_one (l=0x80a1148) at discover.c:539
#10 0x8059926 in dispatch () at dispatch.c:186
#11 0x8049b26 in main (argc=3, argv=0xbffff8fc, envp=0xbffff90c) at dhcpd.c:273
(gdb) frame 6
#6 0x804a9f0 in dhcpinform (packet=0xbfffe600) at dhcp.c:417
417 if (evaluate_option_cache (&d1, packet,
(gdb) print d1
$3 = {buffer = 0x8083958, data = 0x808395c "arachne", len = 7, terminated = 1}
--------8<--------8<--------8<--------8<--------8<--------8<--------
I had a peek at the dhcpinform() function and it looks like some
of the "if (evaluate_option_cache (...)" bodies are lacking a
"data_string_forget (...)" at the end. That is to say, I would
propose the following change:
--------8<--------8<--------8<--------8<--------8<--------8<--------
ts@arachne:~/src/dhcp-3.0-alpha-19990424/server > diff -u dhcp.c{~,}
--- dhcp.c~ Tue Apr 27 08:38:48 1999
+++ dhcp.c Wed Apr 28 17:49:53 1999
@@ -396,6 +396,7 @@
else
raw.file [i] = 0;
memcpy (raw.file, d1.data, i);
+ data_string_forget (&d1, "dhcpinform");
}
/* Choose a server name as above. */
@@ -407,6 +408,7 @@
else
raw.sname [i] = 0;
memcpy (raw.sname, d1.data, i);
+ data_string_forget (&d1, "dhcpinform");
}
/* Set a flag if this client is a lame Microsoft client that NUL
@@ -455,12 +457,18 @@
} else {
if (evaluate_option_cache (&d1, packet,
packet -> options, oc)) {
- if (!d1.len || d1.len != sizeof from)
+ if (!d1.len || d1.len != sizeof from) {
+ /* not sure about that one */
+ data_string_forget (&d1, "dhcpinform");
goto use_primary;
+ }
memcpy (&from, d1.data, sizeof from);
data_string_forget (&d1, "dhcpinform");
- } else
+ } else {
+ /* not sure about that one */
+ data_string_forget (&d1, "dhcpinform");
goto use_primary;
+ }
}
/* Use the subnet mask from the subnet declaration if no other
ts@arachne:~/src/dhcp-3.0-alpha-19990424/server >
--------8<--------8<--------8<--------8<--------8<--------8<--------
I was a bit unsure about the two goto-s. What do you think?
--
Tilman Schmidt E-Mail: [EMAIL PROTECTED] (office)
Sema Group Koeln, Germany [EMAIL PROTECTED] (private)
"newfs leaves the filesystem in a well known state (empty)."
- Henrik Nordstrom
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dhcp/lists
If you are without web access, or if you are having trouble with the web page,
please send mail to [EMAIL PROTECTED] Please try to use the web
page first - it will take a long time for your request to be processed by hand.
Archives for this mailing list are available at
http://www.webnology.com/list-archives/dhcp/dhcp-server
------------------------------------------------------------------------------