Fwd: OpenBSD 5.1 / ISC DHCP Build Issue

paranoid sysadmin paranoid.schizophrenic.2 at gmail.com
Tue Sep 18 13:37:34 UTC 2012


It turns out that this build works if you are using OpenBSD 5.0 (or
earlier). I am not sure what was changed in 5.1 that causes this
failure. Any ideas how to fix this?

Your paranoid sysadmin


---------- Forwarded message ----------
From: paranoid sysadmin <paranoid.schizophrenic.2 at gmail.com>
Date: Mon, Sep 17, 2012 at 2:08 PM
Subject: OpenBSD 5.1 / ISC DHCP Build Issue
To: dhcp-users at lists.isc.org


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
OpenBSD
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
make

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/sys.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