On 2017/08/10 08:36, Florian Obser wrote: > On Wed, Aug 09, 2017 at 09:34:58PM +0100, Stuart Henderson wrote: > > On 2017/08/09 13:07, Jeremie Courreges-Anglas wrote: > > > On Wed, Aug 09 2017, Florian Obser <flor...@openbsd.org> wrote: > > > > I just noticed that dhcpcd looks at flags in struct nd_ifinfo which I > > > > removed in r1.72, this fixes the build. > > > > Sorry about that. > > > > > > > > OK? > > > > > > ok, but: > > > - you may want sthen@ to take a look (maintainer) > > > - please bump REVISION, 'cause in _if_checkipv6 this code would trigger > > > using an old package: > > > > +1 > > > > Would you mind sending it upstream too? https://dev.marples.name/ is > > probably the best option. > > I was going to, that's why I came up with that particular diff, it looked > like it could be fed upstream. > Now I looked and version 7 currently in development / beta shuffled quite > a lot of code around and I'm in some ifdef hell :( not sure if I can make > this work. > > If it were more than one port I would even consider bringing the flags > member back and always have it 0.
Here's the ports diff for 7.0.0-rc1 with ifdefs in what I think are the right place for this (it still works ok in my setup, but it's just a very simple pppoe DHCPv6-PD config). I'm grepping for other uses of ndi now (I think we should probably bump REVISION on anything that uses it anyway due to the struct change). Index: Makefile =================================================================== RCS file: /cvs/ports/net/dhcpcd/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- Makefile 10 Aug 2017 06:58:39 -0000 1.24 +++ Makefile 10 Aug 2017 09:06:44 -0000 @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.24 2017/08/10 06:58:39 florian Exp $ +# $OpenBSD: Makefile,v 1.22 2017/04/21 16:41:20 sthen Exp $ COMMENT= DHCPv4/IPv4LL/IPv6RS/DHCPv6 quad stack client -DISTNAME= dhcpcd-6.11.5 -REVISION= 2 +DISTNAME= dhcpcd-7.0.0-rc1 +PKGNAME= ${DISTNAME:S/-rc/rc/} CATEGORIES= net EXTRACT_SUFX= .tar.xz Index: distinfo =================================================================== RCS file: /cvs/ports/net/dhcpcd/distinfo,v retrieving revision 1.14 diff -u -p -r1.14 distinfo --- distinfo 11 Oct 2016 13:56:02 -0000 1.14 +++ distinfo 10 Aug 2017 09:06:44 -0000 @@ -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-rc1.tar.xz) = jUE0WW8cimR9lCkf6g7W852tZIpIIkcrSB3+SEB7HNM= +SIZE (dhcpcd-7.0.0-rc1.tar.xz) = 204496 Index: patches/patch-dhcpcd_conf =================================================================== RCS file: patches/patch-dhcpcd_conf diff -N patches/patch-dhcpcd_conf --- patches/patch-dhcpcd_conf 8 Sep 2015 19:10:19 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -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 - Index: patches/patch-if-bsd_c =================================================================== RCS file: patches/patch-if-bsd_c diff -N patches/patch-if-bsd_c --- patches/patch-if-bsd_c 10 Aug 2017 06:58:39 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ -$OpenBSD: patch-if-bsd_c,v 1.2 2017/08/10 06:58:39 florian 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 - -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) Index: patches/patch-src_if-bsd_c =================================================================== RCS file: patches/patch-src_if-bsd_c diff -N patches/patch-src_if-bsd_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_if-bsd_c 10 Aug 2017 09:06:44 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +Index: src/if-bsd.c +--- src/if-bsd.c.orig ++++ src/if-bsd.c +@@ -1415,6 +1415,9 @@ if_checkipv6(struct dhcpcd_ctx *ctx, const struct inte + strlcpy(nd.ifname, ifp->name, sizeof(nd.ifname)); + if (ioctl(s, SIOCGIFINFO_IN6, &nd) == -1) + return -1; ++ ++#if defined(ND6_IFF_AUTO_LINKLOCAL) || defined(ND6_IFF_PERFORMNUD) || \ ++ defined(ND6_IFF_ACCEPT_RTADV) || defined(ND6_IFF_IFDISABLED) + flags = (int)nd.ndi.flags; + + #ifdef ND6_IFF_AUTO_LINKLOCAL +@@ -1466,6 +1469,7 @@ if_checkipv6(struct dhcpcd_ctx *ctx, const struct inte + return -1; + } + } ++#endif + + /* Enabling IPv6 by whatever means must be the + * last action undertaken to ensure kernel RS and Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/dhcpcd/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 7 Jan 2016 21:19:53 -0000 1.4 +++ pkg/PLIST 10 Aug 2017 09:06:44 -0000 @@ -1,4 +1,8 @@ @comment $OpenBSD: PLIST,v 1.4 2016/01/07 21:19:53 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