update to dhcpcd-7.0.0
This commit is contained in:
parent
8c9edbc27f
commit
22158ab29e
@ -1,14 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.27 2017/10/27 12:14:17 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.28 2018/01/01 14:58:24 sthen Exp $
|
||||
|
||||
COMMENT= DHCPv4/IPv4LL/IPv6RS/DHCPv6 quad stack client
|
||||
|
||||
DISTNAME= dhcpcd-6.11.5
|
||||
REVISION= 5
|
||||
DISTNAME= dhcpcd-7.0.0
|
||||
|
||||
CATEGORIES= net
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
||||
HOMEPAGE= http://roy.marples.name/projects/dhcpcd/
|
||||
HOMEPAGE= https://roy.marples.name/projects/dhcpcd
|
||||
|
||||
# BSD-2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
@ -17,7 +16,7 @@ WANTLIB += c
|
||||
|
||||
MAINTAINER= Stuart Henderson <sthen@openbsd.org>
|
||||
|
||||
MASTER_SITES= http://roy.marples.name/downloads/dhcpcd/ \
|
||||
MASTER_SITES= https://roy.marples.name/downloads/dhcpcd/ \
|
||||
ftp://roy.marples.name/pub/dhcpcd/
|
||||
|
||||
CONFIGURE_STYLE= simple
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (dhcpcd-6.11.5.tar.xz) = b5Z03H4n6TbMeHF1QEphcWGGdez7aQOrmIextmqH1p4=
|
||||
SIZE (dhcpcd-6.11.5.tar.xz) = 198080
|
||||
SHA256 (dhcpcd-7.0.0.tar.xz) = q2HK7cu/Wv9gjyJ5L3qJuq0Mn4R0mwG3UmylSp7mINU=
|
||||
SIZE (dhcpcd-7.0.0.tar.xz) = 207924
|
||||
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-dhcpcd_conf,v 1.3 2015/09/08 19:10:19 sthen Exp $
|
||||
|
||||
Disable NTP by default.
|
||||
|
||||
--- dhcpcd.conf.orig Fri Sep 4 13:41:18 2015
|
||||
+++ dhcpcd.conf Tue Sep 8 21:04:20 2015
|
||||
@@ -27,7 +27,7 @@ option rapid_commit
|
||||
option domain_name_servers, domain_name, domain_search, host_name
|
||||
option classless_static_routes
|
||||
# Most distributions have NTP support.
|
||||
-option ntp_servers
|
||||
+#option ntp_servers
|
||||
# Respect the network MTU. This is applied to DHCP routes.
|
||||
option interface_mtu
|
||||
|
@ -1,56 +0,0 @@
|
||||
$OpenBSD: patch-if-bsd_c,v 1.3 2017/10/27 09:44:46 mpi Exp $
|
||||
|
||||
Workaround for our old broken behaviour no longer needed.
|
||||
Fixed with netinet6/in6.c r1.202.
|
||||
|
||||
netinet6/nd6.h r1.72 removed ND6_IFF_PERFORMNUD
|
||||
|
||||
Also conditionnaly flush prefix and router lists, OpenBSD no longer
|
||||
keep track of them in kernel. So there's no risk for dhcpcd(8) to
|
||||
have its advertised routers and prefixes expired.
|
||||
|
||||
Index: if-bsd.c
|
||||
--- if-bsd.c.orig
|
||||
+++ if-bsd.c
|
||||
@@ -985,7 +985,7 @@ if_address6(unsigned char cmd, const struct ipv6_addr
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if 0
|
||||
/* BUT OpenBSD does not reset the address lifetime
|
||||
* for subsequent calls...
|
||||
* Luckily dhcpcd will remove the lease when it expires so
|
||||
@@ -1688,6 +1688,7 @@ ip6_temp_valid_lifetime(__unused const char *ifname)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if defined(ND6_IFF_AUTO_LINKLOCAL) || defined(ND6_IFF_PERFORMNUD) || defined(ND6_IFF_ACCEPT_RTADV) || defined(ND6_IFF_IFDISABLED)
|
||||
#define del_if_nd6_flag(s, ifname, flag) if_nd6_flag((s), (ifp), (flag), -1)
|
||||
#define get_if_nd6_flag(s, ifname, flag) if_nd6_flag((s), (ifp), (flag), 0)
|
||||
#define set_if_nd6_flag(s, ifname, flag) if_nd6_flag((s), (ifp), (flag), 1)
|
||||
@@ -1713,6 +1714,7 @@ if_nd6_flag(int s, const struct interface *ifp, unsign
|
||||
return 0;
|
||||
return ioctl(s, SIOCSIFINFO_FLAGS, &nd);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int
|
||||
if_raflush(int s)
|
||||
@@ -1720,9 +1722,14 @@ if_raflush(int s)
|
||||
char dummy[IFNAMSIZ + 8];
|
||||
|
||||
strlcpy(dummy, "lo0", sizeof(dummy));
|
||||
- if (ioctl(s, SIOCSRTRFLUSH_IN6, (void *)&dummy) == -1 ||
|
||||
- ioctl(s, SIOCSPFXFLUSH_IN6, (void *)&dummy) == -1)
|
||||
+#ifdef SIOCSRTRFLUSH_IN6
|
||||
+ if (ioctl(s, SIOCSRTRFLUSH_IN6, (void *)&dummy) == -1)
|
||||
return -1;
|
||||
+#endif
|
||||
+#ifdef SIOCSPFXFLUSH_IN6
|
||||
+ if (ioctl(s, SIOCSPFXFLUSH_IN6, (void *)&dummy) == -1)
|
||||
+ return -1;
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
24
net/dhcpcd/patches/patch-src_if-bsd_c
Normal file
24
net/dhcpcd/patches/patch-src_if-bsd_c
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-src_if-bsd_c,v 1.1 2018/01/01 14:58:24 sthen Exp $
|
||||
|
||||
OpenBSD removed these ioctl()s, it no longer keeps track of prefix
|
||||
and router lists in kernel so there's no risk of dhcpcd(8) having its
|
||||
advertised routers and prefixes expired.
|
||||
|
||||
Index: src/if-bsd.c
|
||||
--- src/if-bsd.c.orig
|
||||
+++ src/if-bsd.c
|
||||
@@ -1514,10 +1514,14 @@ if_checkipv6(struct dhcpcd_ctx *ctx, const struct inte
|
||||
char dummy[IFNAMSIZ + 8];
|
||||
|
||||
strlcpy(dummy, "lo0", sizeof(dummy));
|
||||
+#ifdef SIOCSRTRFLUSH_IN6
|
||||
if (ioctl(s, SIOCSRTRFLUSH_IN6, (void *)&dummy) == -1)
|
||||
logwarn("SIOCSRTRFLUSH_IN6");
|
||||
+#endif
|
||||
+#ifdef SIOCSPFXFLUSH_IN6
|
||||
if (ioctl(s, SIOCSPFXFLUSH_IN6, (void *)&dummy) == -1)
|
||||
logwarn("SIOCSPFXFLUSH_IN6");
|
||||
+#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.4 2016/01/07 21:19:53 sthen Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.5 2018/01/01 14:58:24 sthen Exp $
|
||||
@extraunexec rm ${LOCALSTATEDIR}/db/dhcpcd/*
|
||||
@sample ${LOCALSTATEDIR}/db/dhcpcd/
|
||||
@comment handle DUID file move for a smoother transition to 7.0
|
||||
@exec-update [[ ! -f ${LOCALSTATEDIR}/db/dhcpcd/duid ]] && [[ -r /etc/dhcpcd.duid ]] && cp ${SYSCONFDIR}/dhcpcd.duid ${LOCALSTATEDIR}/db/dhcpcd/duid
|
||||
libexec/dhcpcd-hooks/
|
||||
libexec/dhcpcd-hooks/01-test
|
||||
libexec/dhcpcd-hooks/02-dump
|
||||
|
Loading…
x
Reference in New Issue
Block a user