Commit 8685520f authored by Natanael Copa's avatar Natanael Copa

main/dhcp: upgrade to 4.1.1_p1 (cve-2010-2156)

fixes #378
parent b02e6ce8
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dhcp
pkgver=4.1.0_p1
_realver=4.1.0p1
pkgrel=8
pkgver=4.1.1_p1
_realver=4.1.1-P1
pkgrel=0
pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)"
url="https://www.isc.org/"
license="GPL"
......@@ -11,7 +11,6 @@ makedepends=
install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade"
subpackages="$pkgname-doc $pkgname-dev dhclient dhcrelay"
source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz
linux_ipv6_discover.patch
dhcp-3.0-fix-perms.patch
dhcrelay.initd
dhcrelay.confd
......@@ -21,7 +20,6 @@ source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz
prepare() {
cd "$srcdir/$pkgname-$_realver"
patch -p1 -i "$srcdir"/dhcp-3.0-fix-perms.patch || return 1
patch -p1 -i ../linux_ipv6_discover.patch || return 1
}
build() {
......@@ -72,8 +70,7 @@ dhcrelay() {
"$subpkgdir"/etc/conf.d/dhcrelay
}
md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz
37abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch
md5sums="ee390a35687dd75dbfc32c856c0938d1 dhcp-4.1.1-P1.tar.gz
a9eaf182dae3984670da52f20ae10fba dhcp-3.0-fix-perms.patch
1597c012bb1a2c0828254c87f0a904ad dhcrelay.initd
db84514fe15fd7d81136afbaae738f55 dhcrelay.confd
......
diff -Naur dhcp-4.1.0a2/common/discover.c dhcp-4.1.0a2-mcn/common/discover.c
--- dhcp-4.1.0a2/common/discover.c 2008-08-29 18:48:57.000000000 +0100
+++ dhcp-4.1.0a2-mcn/common/discover.c 2008-10-02 13:02:06.000000000 +0100
@@ -443,15 +443,17 @@
}
#ifdef DHCPv6
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
- close(ifaces->sock);
- ifaces->sock = -1;
- fclose(ifaces->fp);
- ifaces->fp = NULL;
- return 0;
+ if (local_family == AF_INET6) {
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+ if (ifaces->fp6 == NULL) {
+ log_error("Error opening '/proc/net/if_inet6' to "
+ "list IPv6 interfaces; %m");
+ close(ifaces->sock);
+ ifaces->sock = -1;
+ fclose(ifaces->fp);
+ ifaces->fp = NULL;
+ return 0;
+ }
}
#endif
@@ -720,7 +722,8 @@
}
#ifdef DHCPv6
if (!(*err)) {
- return next_iface6(info, err, ifaces);
+ if (local_family == AF_INET6)
+ return next_iface6(info, err, ifaces);
}
#endif
return 0;
@@ -736,7 +739,8 @@
close(ifaces->sock);
ifaces->sock = -1;
#ifdef DHCPv6
- fclose(ifaces->fp6);
+ if (local_family == AF_INET6)
+ fclose(ifaces->fp6);
ifaces->fp6 = NULL;
#endif
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment