summaryrefslogtreecommitdiff
path: root/net-misc/dhcpcd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-17 11:37:14 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-17 11:37:14 +0000
commitf8deb4f754798d63fb6b82178452ee846df8475f (patch)
tree8f187327b54a42741f986268292e3096aadc4019 /net-misc/dhcpcd
parentc4a46526c2232ba00b0ccc97f2d2a30b0c6baea5 (diff)
gentoo auto-resync : 17:02:2024 - 11:37:14
Diffstat (limited to 'net-misc/dhcpcd')
-rw-r--r--net-misc/dhcpcd/Manifest2
-rw-r--r--net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild170
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch46
3 files changed, 218 insertions, 0 deletions
diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 6809f5750a41..13b365b4f33b 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -4,6 +4,7 @@ AUX 10.0.5/0003-control-abort-control-recv-path-hangup.patch 2592 BLAKE2B 483219
AUX 10.0.5/0004-dhcpcd-remove-stdio-callback-detach-daemonize.patch 8772 BLAKE2B ec0c000fe60582dc9d7f2b7d2686dd84eb740d92bd44d1da3af4bca67b0db3f0dd548f4b8a1f3ad5dd4413276267084e7d0da1c181b7fda39dd667e3cd3df2c5 SHA512 e76e37c08a854d4d99bfcbb468aa8b9e83a220812c937e32dca5e6ba66d3aa147bc3f3da25d64b8bafdf1fdbf7fc5c9a46ad336a812e0bac65165bf3435e7471
AUX 10.0.5/0005-fix-privsep-builds-for-prior.patch 589 BLAKE2B 951aa4e4ad7f441c958a4ebe9341616a5041b99cd68f669a6e4bfab6882de7f55a7fafa9a7c75295e77ef38fd823ba44ee8385bc0920e383b515ac7bc89562da SHA512 275337e99543eadeeb8804e1a8f5ec8ccbef9e922a3a25536c3cd69ca0a60cacdda26bbf8103adab46fafd0e2f6e9a6b75dcbec3b6146823ad611b6c9614914c
AUX 10.0.5/0006-fix-unused-var-warning.patch 1148 BLAKE2B 2f4a800e55aec46d834777649357a0e4137261d0b7ca342d53b08fdfde69ffe7654478978145c6400feb82f9d1a05598319ccb6e5421da94155829512315fcba SHA512 e8a0874f5a216e101a3adb9f56c12b798263a300f13a9b34ff3ce9b6276f43dc50f39d59977f38ea9abcaa24c49753add19add10589fe185f85dde8451820287
+AUX dhcpcd-10.0.6-crash.patch 1598 BLAKE2B 149cd9ab0372ba507505d1d30707e18ef69b7db583211e86bd48c2fabcde62003356735813789d4f021bdc1636291b0469601fbd2be33f79f84ba17147968f84 SHA512 dfe49bb7d872ffc27ece3d59635cc5a81975181065ae0c54576195637266b24653832c05146bf2e6c0e9f772faf1920c09f234d40b0bf57c8eabf50d0a9818ae
AUX dhcpcd-10.0.6-rebinding.patch 1351 BLAKE2B 5bf20cc11f82082b9aed01279c2071d948cb4308e935289b2ff7022cd146b4e600cd35dfe63d08006311769b1816cbadb0fcfe7cecaecec64d25fc1f0ddc450f SHA512 c657af1001ea7dbfcd3a6c502667cda3eb164ee532e2083976ab5a46cdc4ab0a0812fd828f0bb98dd6bf326ecdaa3ef16f4d545580c59c63f8aad0e893651427
AUX dhcpcd.initd-r1 339 BLAKE2B f5c8574545d211918cba49b0e0caf22b6dd0630d3e8627e8fc4c40dc4415fd70c83889b631606085ecf87f925a7a199cd5712178a2c90186c6b8ac4f792b0789 SHA512 cd186e4c0733fcd9c333bf7c813a879c38c962bcf6a3288577f6b1632312b10f69ac68ca413c32106559d9e53fa05de78410cba677247b52bcbcf3b35024974f
AUX dhcpcd.service-r1 308 BLAKE2B 558789adc2b67ee9d13b8213c9729f23dc691d3da8e96d93283c6c1fcf3733b17036df2a736166414a4a4738ca2a41f11b498326f18dace02e3b77945f7d8f23 SHA512 992b6f3c69b982f1dc01098dbecdee1ee2dc12e59646d13648f378a2e628cc612b65ee15a1373e3cacf7e712c6a6708c6824a9396b53e8ed8b0b3179f5267041
@@ -14,6 +15,7 @@ DIST dhcpcd-9.5.1.tar.xz 258280 BLAKE2B 355a98d415253608e8f586809d41e7654c1973d9
EBUILD dhcpcd-10.0.3.ebuild 4649 BLAKE2B e00e857c44168096c3530004d32bb62250681d686b17954b46bd6993f32ca963d4369ae79ee9d15afc90c53b9e1d7c3f71b2a819278c44e12b59d1cb08a8affb SHA512 3596770f90d6b49b1c677538cbe1b34b482a886a322050f664d90ec6851b839b3294a57144d8e7c1f93530db3e4120b95d11ded5c568162c6ac0510ec9dcbfdf
EBUILD dhcpcd-10.0.5-r1.ebuild 4684 BLAKE2B a9f60400d1d3be191f47de793f49413d4d24fbeedd8e637d2a3beedfeaed5a123740323ba438319369845ca78b2771fe366e9f4edaa576716262d68064b76d99 SHA512 166a9f1999e7611a3bf39085a2499c9596e33d9cd35d09c1d1a94fbd5cf0770f994814e315ae2417e7469dd91b8a5c13abde2f12b03d77c909491b653fc95b13
EBUILD dhcpcd-10.0.6-r1.ebuild 4874 BLAKE2B 7d6cf19cd8cd9183a1d373372c3f2cef5338a98ceb95457b69ff1f0165f0f5e33465d3aca203a5e5c44722cd12ccccc6353cc580b5219055230de5091f6eb219 SHA512 af060355f679965ae45bdc378028464735c88374ddda41b8bbcac80ef3231b6dc571d50a4d093aa2be0af4247245987117de01e67a0998f0cacfdb2a9470ec3a
+EBUILD dhcpcd-10.0.6-r2.ebuild 4922 BLAKE2B 1353be744a227eeac2490939103e700a708a3fcdcb2eaa942053a640da58e4e0b0b7beed3baa704065ba1f07f8d9a9fb1e6cb449f717588358235ea319c1fb17 SHA512 e1ede971c0135f144638349995b02d50c44e19b842cfde88bc402dd07b89f0f567db9e91ea9db135b23e95c75d2b3028f7d027da4d8e5512bf10d4643d572da4
EBUILD dhcpcd-10.0.6.ebuild 4825 BLAKE2B 770a30abb6aa31c7c980f9ae97f53ee6390e9aa2f147c2290daf1e3b0202e7ad9c366fbf389e464b0766e8d1a42ecfc643c0e11ad55490d587f039c0def60f56 SHA512 ea7aaa97d18efecb1abbb2ad4b969138e5b4c0b46b772d1c2b5ecc9a8ae844fd320831b9a7eadd03178daa70324a23e3e6f73a3cb36929364776a5f62ee75939
EBUILD dhcpcd-9.5.1.ebuild 4610 BLAKE2B e74ed2bcac66ce60354b6a1d5fe606b91c87057db2e23dd31fd1035aa5ab05042053c62d04b406c5ff9c1b96a2e196a60a8df699c7755319ca50a58f627e684e SHA512 88976827203f49c28d45cb0dfd65b1f71e881e53c617e3cc131f6886197cfcc50dfaa6d0d1a2e6e678e12f9964aa50f70d102475bcbcc9431e6d5f4c98c5120b
EBUILD dhcpcd-9999.ebuild 4825 BLAKE2B 770a30abb6aa31c7c980f9ae97f53ee6390e9aa2f147c2290daf1e3b0202e7ad9c366fbf389e464b0766e8d1a42ecfc643c0e11ad55490d587f039c0def60f56 SHA512 ea7aaa97d18efecb1abbb2ad4b969138e5b4c0b46b772d1c2b5ecc9a8ae844fd320831b9a7eadd03178daa70324a23e3e6f73a3cb36929364776a5f62ee75939
diff --git a/net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild b/net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild
new file mode 100644
index 000000000000..8ccbe2c41a96
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/NetworkConfiguration/dhcpcd.git"
+else
+ MY_P="${P/_alpha/-alpha}"
+ MY_P="${MY_P/_beta/-beta}"
+ MY_P="${MY_P/_rc/-rc}"
+ SRC_URI="https://github.com/NetworkConfiguration/dhcpcd/releases/download/v${PV}/${MY_P}.tar.xz"
+ S="${WORKDIR}/${MY_P}"
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://github.com/NetworkConfiguration/dhcpcd/ https://roy.marples.name/projects/dhcpcd/"
+
+LICENSE="BSD-2 BSD ISC MIT"
+SLOT="0"
+IUSE="debug +embedded ipv6 privsep +udev"
+
+DEPEND="udev? ( virtual/udev )"
+RDEPEND="
+ ${DEPEND}
+ privsep? (
+ acct-group/dhcpcd
+ acct-user/dhcpcd
+ )
+"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # These don't exist on Linux/glibc (bug #900264)
+ memset_explicit
+ memset_s
+ setproctitle
+ strtoi
+ consttime_memequal
+ SHA256_Init
+ hmac
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-10.0.6-rebinding.patch
+ "${FILESDIR}"/${PN}-10.0.6-crash.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --dbdir="${EPREFIX}/var/lib/dhcpcd"
+ --libexecdir="${EPREFIX}/lib/dhcpcd"
+ --localstatedir="${EPREFIX}/var"
+ --prefix="${EPREFIX}"
+ --with-hook=ntp.conf
+ $(use_enable debug)
+ $(use_enable embedded)
+ $(use_enable ipv6)
+ $(use_enable privsep)
+ $(usex elibc_glibc '--with-hook=yp.conf' '')
+ --rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
+ $(usex privsep '--privsepuser=dhcpcd' '')
+ $(usex udev '' '--without-dev --without-udev')
+ CC="$(tc-getCC)"
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ keepdir /var/lib/dhcpcd
+ newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+ systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
+}
+
+pkg_postinst() {
+ local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
+
+ local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
+ local old_duid="${EROOT}"/etc/dhcpcd.duid
+ local new_duid="${dbdir}"/duid
+ if [[ -e "${old_old_duid}" ]] ; then
+ # Upgrade the duid file to the new format if needed
+ if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+ sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+ fi
+
+ # Move the duid to /etc, a more sensible location
+ if [[ ! -e "${old_duid}" ]] ; then
+ cp -p "${old_old_duid}" "${new_duid}"
+ fi
+ old_files+=( "${old_old_duid}" )
+ fi
+
+ # dhcpcd-7 moves the files out of /etc
+ if [[ -e "${old_duid}" ]] ; then
+ if [[ ! -e "${new_duid}" ]] ; then
+ cp -p "${old_duid}" "${new_duid}"
+ fi
+ old_files+=( "${old_duid}" )
+ fi
+ local old_secret="${EROOT}"/etc/dhcpcd.secret
+ local new_secret="${dbdir}"/secret
+ if [[ -e "${old_secret}" ]] ; then
+ if [[ ! -e "${new_secret}" ]] ; then
+ cp -p "${old_secret}" "${new_secret}"
+ fi
+ old_files+=( "${old_secret}" )
+ fi
+
+ # dhcpcd-7 renames some files in /var/lib/dhcpcd
+ local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+ local new_rdm="${dbdir}"/rdm_monotonic
+ if [[ -e "${old_rdm}" ]] ; then
+ if [[ ! -e "${new_rdm}" ]] ; then
+ cp -p "${old_rdm}" "${new_rdm}"
+ fi
+ old_files+=( "${old_rdm}" )
+ fi
+ local lease=
+ for lease in "${dbdir}"/dhcpcd-*.lease*; do
+ [[ -f "${lease}" ]] || continue
+ old_files+=( "${lease}" )
+ local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+ [[ -e "${dbdir}/${new_lease}" ]] && continue
+ cp "${lease}" "${dbdir}/${new_lease}"
+ done
+
+ # Warn about removing stale files
+ if [[ -n "${old_files[@]}" ]] ; then
+ elog
+ elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+ elog "${EROOT}/etc to ${dbdir}"
+ elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+ elog "prefix dropped."
+ elog
+ elog "You should remove these files if you don't plan on reverting"
+ elog "to an older version:"
+ local old_file=
+ for old_file in ${old_files[@]}; do
+ elog " ${old_file}"
+ done
+ fi
+
+ if [ -z "${REPLACING_VERSIONS}" ]; then
+ elog
+ elog "dhcpcd has zeroconf support active by default."
+ elog "This means it will always obtain an IP address even if no"
+ elog "DHCP server can be contacted, which will break any existing"
+ elog "failover support you may have configured in your net configuration."
+ elog "This behaviour can be controlled with the noipv4ll configuration"
+ elog "file option or the -L command line switch."
+ elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+ elog
+ elog "Dhcpcd has duid enabled by default, and this may cause issues"
+ elog "with some dhcp servers. For more information, see"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+ fi
+
+ if ! has_version net-dns/bind-tools; then
+ elog
+ elog "If you activate the lookup-hostname hook to look up your hostname"
+ elog "using the dns, you need to install net-dns/bind-tools."
+ fi
+}
diff --git a/net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch b/net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch
new file mode 100644
index 000000000000..5b61e3ca37ef
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch
@@ -0,0 +1,46 @@
+https://github.com/NetworkConfiguration/dhcpcd/issues/179
+https://github.com/NetworkConfiguration/dhcpcd/issues/283
+https://bugzilla.redhat.com/2262996
+https://github.com/NetworkConfiguration/dhcpcd/commit/727c78f503d456875e2a3cee7609288b537d9d25
+
+From 727c78f503d456875e2a3cee7609288b537d9d25 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
+Date: Fri, 16 Feb 2024 17:15:35 +0100
+Subject: [PATCH] Move dhcp(v4) packet size check earlier (#295)
+
+dhcp_handlebootp handled zero sized packets correctly, but
+dhcp_redirect_dhcp did not have such protection. Move size check before
+both of them. Size when called from dhcp_packet is checked by
+is_packet_udp_bootp call. Only dhcp_recvmsg needs earlier checking to be
+added.
+
+Fixes #283
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -3532,12 +3532,6 @@ dhcp_handlebootp(struct interface *ifp, struct bootp *bootp, size_t len,
+ {
+ size_t v;
+
+- if (len < offsetof(struct bootp, vend)) {
+- logerrx("%s: truncated packet (%zu) from %s",
+- ifp->name, len, inet_ntoa(*from));
+- return;
+- }
+-
+ /* Unlikely, but appeases sanitizers. */
+ if (len > FRAMELEN_MAX) {
+ logerrx("%s: packet exceeded frame length (%zu) from %s",
+@@ -3670,6 +3664,13 @@ dhcp_recvmsg(struct dhcpcd_ctx *ctx, struct msghdr *msg)
+ logerr(__func__);
+ return;
+ }
++
++ if (iov->iov_len < offsetof(struct bootp, vend)) {
++ logerrx("%s: truncated packet (%zu) from %s",
++ ifp->name, iov->iov_len, inet_ntoa(from->sin_addr));
++ return;
++ }
++
+ state = D_CSTATE(ifp);
+ if (state == NULL) {
+ /* Try re-directing it to another interface. */