aboutsummaryrefslogtreecommitdiffstats
path: root/main/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'main/dhcp')
-rw-r--r--main/dhcp/APKBUILD9
-rw-r--r--main/dhcp/linux_ipv6_discover.patch50
2 files changed, 54 insertions, 5 deletions
diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD
index 284e15eeea..c73f945576 100644
--- a/main/dhcp/APKBUILD
+++ b/main/dhcp/APKBUILD
@@ -2,7 +2,7 @@
pkgname=dhcp
pkgver=4.1.0_p1
_realver=4.1.0p1
-pkgrel=1
+pkgrel=2
pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)"
url="https://www.isc.org/"
license="GPL"
@@ -11,12 +11,13 @@ makedepends=
install="dhcp.pre-install dhcp.pre-upgrade dhcp.post-upgrade"
subpackages="$pkgname-doc $pkgname-dev dhclient"
source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz
- $install
+ linux_ipv6_discover.patch
dhcpd.confd
dhcpd.initd"
build() {
cd "$srcdir/$pkgname-$_realver"
+ patch -p1 -i ../linux_ipv6_discover.patch || return 1
./configure --prefix=/usr \
--sysconfdir=/etc/dhcp \
@@ -49,8 +50,6 @@ dhclient() {
}
md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz
-19b28380eaae7d26027c29b623aeee07 dhcp.pre-install
-6cc49497f3c30ccd37fc7c032f7810c6 dhcp.pre-upgrade
-36d562e5b0e55a36e4224fd7cb843f6a dhcp.post-upgrade
+37abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch
df32707f5bbe5363306420b5dc6e6b40 dhcpd.confd
6ed5ddba2b445ef60d27a8b7f5a0ee0b dhcpd.initd"
diff --git a/main/dhcp/linux_ipv6_discover.patch b/main/dhcp/linux_ipv6_discover.patch
new file mode 100644
index 0000000000..ebf3865e6a
--- /dev/null
+++ b/main/dhcp/linux_ipv6_discover.patch
@@ -0,0 +1,50 @@
+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
+ }