OpenBSD 5.1 / ISC DHCP Build Issue

paranoid sysadmin paranoid.schizophrenic.2 at
Mon Sep 17 19:08:23 UTC 2012

I don't know if anyone has seen this problem before. I am doing some
work for a non-profit. Money strapped, aren't we all, they reuse their
old pc/workstation computers for firewalls, dhcp, bind, vpn
management, etc. They are small enough that even 4 year old computer
is more than big/fast enough for these purposes when running OpenBSD.

As you can imagine, they took a fatal, power-induced, hardware crash.
I went to build a new dhcp server using OpenBSD 5.1 (latest). The
install went fine and it connects to network, etc. I went to replace
the OpenBSD default dhcp (ancient custom copy) with a build of ISC
dhcp-4.2.4-P2 and everything went pear shaped.

I used our usual DHCP/OpenBSD build script that contains the following:

./configure --prefix=/opt/installdhcp --mandir=/usr/share/man
--sbindir=/opt/installdhcp/sbin --bindir=/opt/installdhcp/sbin
--sysconfdir=/etc –libdir=/usr/lib –includedir=/usr/include

Everything was working as expected until:

gcc -DHAVE_CONFIG_H -I. -I../includes  -I.. -DLOCALSTATEDIR='"/var"'
 -g -O2  -Wall -Werror -fno-strict-aliasing -I../bind/include -MT
parse.o -MD
-MP -MF .deps/parse.Tpo -c -o parse.o parse.c
cc1: warnings being treated as errors
parse.c: In function 'parse_cshl':
parse.c:2002: warning: array size (1) smaller than bound length (128)
parse.c:2002: warning: array size (1) smaller than bound length (128)
*** Error code 1
Stop in /opt/src/dhcp-4.2.4-P2/common (line 92 of /usr/share/mk/
*** Error code 1
Stop in /opt/src/dhcp-4.2.4-P2/common (line 351 of Makefile).
*** Error code 1
Stop in /opt/src/dhcp-4.2.4-P2 (line 268 of Makefile).

I traced this down to the following lines in parse.c

        rvp = &data -> buffer -> data [0];
        while (sl) {
                next = sl -> next;
                memcpy (rvp, sl -> data, sizeof ibuf); # <-- flagged line
                rvp += sizeof ibuf;
                dfree (sl, MDL);
                sl = next;

This build works fine on an OpenBSD 5.0 machine that I have available.

Has anybody else seen this? Any workarounds?


More information about the dhcp-users mailing list