#1035990 isc-dhcp-relay upgrade empty value of /etc/default/isc-dhcp-relay OPTIONS= line

Package:
isc-dhcp-relay
Source:
isc-dhcp-relay
Description:
ISC DHCP relay daemon
Submitter:
Laurent GUERBY
Date:
2026-08-05 17:33:08 UTC
Severity:
normal
#1035990#5
Date:
2023-05-12 07:31:50 UTC
From:
To:
Hi,

This morning debian bookworm unattended-upgrades updated isc-dhcp-relay
to 4.4.3-P1-2

This upgrade changed our /etc/default/isc-dhcp-relay as follows:


@@ -13,4 +13,4 @@
 INTERFACES="eth0.31 eth0.32"
 
 # Additional options that are passed to the DHCP relay daemon?
-OPTIONS="-iu eth0.16"
+OPTIONS=""

=> it emptied the value of OPTIONS, restarted isc-dhcp-relay and broke
DHCP on our network since -iu is necessary there.

The package postinst script does the following:

db_get isc-dhcp-relay/options || true
OPTIONS="${RET}"

TMPFILE=`mktemp -q /tmp/dhcp.config.XXXXXX`
sed -e "s/^[[:space:]]*OPTIONS[[:space:]]*=.*/OPTIONS=\"${OPTIONS}\"/"
\
        <${INITCONFFILE} >${TMPFILE}
cp ${TMPFILE} ${INITCONFFILE}
rm ${TMPFILE}

Does not seem suspicious to me but I'm no .deb expert.

I don't know if this issue is specific to this version upgrade or if it
was there before.

Thanks for your help,

Sincerely,

Laurent

#1035990#10
Date:
2025-09-15 14:57:01 UTC
From:
To:
Hi,

I've been bitten again by this when upgrading from debian 12 to debian 13 our DHCP relay server.

This time I looked a bit more in detail debian/isc-dhcp-relay.postinst does :

db_get isc-dhcp-relay/options || true
OPTIONS="${RET}"

TMPFILE=`mktemp -q /tmp/dhcp.config.XXXXXX`
sed -e "s/^[[:space:]]*OPTIONS[[:space:]]*=.*/OPTIONS=\"${OPTIONS}\"/" \
        <${INITCONFFILE} >${TMPFILE}
cp ${TMPFILE} ${INITCONFFILE}
rm ${TMPFILE}

So this unconditionnally overwrite from db_get to /etc/default/isc-dhcp-relay without telling the user.

This means that any direct edit done over the time to /etc/default/isc-dhcp-relay will be lost and reset to the initial install choices (if any) when upgrading or reinstalling.

I don't think debian should overwrite what the user has written to /etc/default/isc-dhcp-relay, I'm not familiar with debian policy but usually when a config file is changed by the upgrade process debian is carefull to warn the user and propose to keep the changes or install the packager version.

Thanks,

Laurent

#1035990#15
Date:
2025-09-15 15:57:36 UTC
From:
To:
It reads the information from /etc/default/isc-dhcp-relay in
debian/isc-dhcp-relay.config and puts in the database. It then prompts
the user (presenting the values read in from the defaults file), and
then the postinst pokes the potentially changed values back into the
defaults file.

Barring bugs, this looks like proper handling of debconf-configured
parameters. Please investigate why this does not work as advertised.

That being said, please migrate away from isc-dhcp-relay; Debian 13 is
likely the last debian release to feature that package. It has been dead
upstream already for years.

Greetings
Marc

#1035990#20
Date:
2025-09-15 17:18:41 UTC
From:
To:
Hi,

Thanks for your quick answer and detailed explanation of the inner
working of debconf. 

I read the .config script you mentionned and probably found the bug:

# Read current configuration - the user might not use dpkg-reconfigure
# to change /etc/default/isc-dhcp-relay, so we need to do this to
# preserve the configuration.
if [ -r ${INITCONFFILE} ]; then
	. ${INITCONFFILE}
	db_set isc-dhcp-relay/servers "${SERVERS}"
	db_set isc-dhcp-relay/interfaces "${INTERFACES}"
fi

isc-dhcp-relay/options is not read at all from the config file so it
probably won't be checked and preserved.

Yes we're aware of this, we have a few thing to cleanup from our legacy
configs to be able to migrate off old ISC stuff.

Thanks again for your help,

Sincerely,

Laurent

#1035990#25
Date:
2025-10-07 03:27:59 UTC
From:
To:
Hi again,

Do you need more information from me to fix this issue?

From what I understand the following line:

   db_set isc-dhcp-relay/options "${OPTIONS}"

needs to be added inside the if handling INITCONFFILE so the user set
OPTIONS= in /etc/default/isc-dhcp-relay is not overwritten on upgrade.

Thanks in advance,

Sincerely,

Laurent GUERBY

#1035990#30
Date:
2026-08-05 17:31:09 UTC
From:
To:
Dear submitter,

as the package isc-dhcp has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1143544

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)