CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri May 24 16:10:21 UTC 2024 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: dhcpcd-10.0.8 To generate a diff of this commit: cvs rdiff -u -r1.2005 -r1.2006 src/doc/3RDPARTY cvs rdiff -u -r1.3059 -r1.3060 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.2005 src/doc/3RDPARTY:1.2006 --- src/doc/3RDPARTY:1.2005 Fri May 24 11:33:04 2024 +++ src/doc/3RDPARTY Fri May 24 16:10:21 2024 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.2005 2024/05/24 11:33:04 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.2006 2024/05/24 16:10:21 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -354,8 +354,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 10.0.7 -Current Vers: 10.0.7 +Version: 10.0.8 +Current Vers: 10.0.8 Maintainer: roy Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3059 src/doc/CHANGES:1.3060 --- src/doc/CHANGES:1.3059 Fri May 24 11:33:04 2024 +++ src/doc/CHANGES Fri May 24 16:10:21 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3059 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3060 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -411,5 +411,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0: functions. [uwe 20240517] hp300: Installation CD ISO image is now bootable. [tsutsui 20240519] tic(1): Honour the user's umask (from RVP). [christos 20240520] - dhcpcd: Import version 10.0.7. [roy 20240524] + dhcpcd: Import version 10.0.8. [roy 20240524]
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri May 24 16:10:21 UTC 2024 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: dhcpcd-10.0.8 To generate a diff of this commit: cvs rdiff -u -r1.2005 -r1.2006 src/doc/3RDPARTY cvs rdiff -u -r1.3059 -r1.3060 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Fri May 24 16:09:09 UTC 2024 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp6.c dhcpcd.c Log Message: Sync with dhcpcd-10.0.8 To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.55 -r1.56 src/external/bsd/dhcpcd/dist/src/dhcpcd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.33 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.34 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.33 Fri May 24 11:30:29 2024 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Fri May 24 16:09:09 2024 @@ -3494,7 +3494,7 @@ dhcp6_recvif(struct interface *ifp, cons * To keep the same behaviour we won't do anything with * this. In the future we should make a lists of * ADVERTS and pick the "best" one. */ - logdebugx("%s: discarding ADVERTISMENT from %s", + logdebugx("%s: discarding ADVERTISEMENT from %s", ifp->name, sfrom); return; } Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.55 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.56 --- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.55 Fri May 24 11:30:29 2024 +++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Fri May 24 16:09:09 2024 @@ -423,8 +423,8 @@ dhcpcd_drop_af(struct interface *ifp, in #endif #ifdef ARP arp_drop(ifp); - } #endif + } #if !defined(DHCP6) && !defined(DHCP) UNUSED(stop);
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Fri May 24 16:09:09 UTC 2024 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp6.c dhcpcd.c Log Message: Sync with dhcpcd-10.0.8 To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.55 -r1.56 src/external/bsd/dhcpcd/dist/src/dhcpcd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri May 24 16:08:09 UTC 2024 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv6739 Log Message: Update to dhcpcd-10.0.8 with the following fixes: * Fixed compile without ARP * Fixed spelling of ADVERTISEMENT Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_8 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 2 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri May 24 16:08:09 UTC 2024 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv6739 Log Message: Update to dhcpcd-10.0.8 with the following fixes: * Fixed compile without ARP * Fixed spelling of ADVERTISEMENT Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_8 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 2 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri May 24 11:33:04 UTC 2024 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-10.0.7 To generate a diff of this commit: cvs rdiff -u -r1.2004 -r1.2005 src/doc/3RDPARTY cvs rdiff -u -r1.3058 -r1.3059 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri May 24 11:33:04 UTC 2024 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-10.0.7 To generate a diff of this commit: cvs rdiff -u -r1.2004 -r1.2005 src/doc/3RDPARTY cvs rdiff -u -r1.3058 -r1.3059 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.2004 src/doc/3RDPARTY:1.2005 --- src/doc/3RDPARTY:1.2004 Wed May 8 09:52:07 2024 +++ src/doc/3RDPARTY Fri May 24 11:33:04 2024 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.2004 2024/05/08 09:52:07 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.2005 2024/05/24 11:33:04 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -354,13 +354,13 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 10.0.6 -Current Vers: 10.0.6 +Version: 10.0.7 +Current Vers: 10.0.7 Maintainer: roy Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Home Page: https://github.com/NetworkConfiguration/dhcpcd -Date: 2023-12-18 +Date: 2024-05-24 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3058 src/doc/CHANGES:1.3059 --- src/doc/CHANGES:1.3058 Tue May 21 15:35:18 2024 +++ src/doc/CHANGES Fri May 24 11:33:04 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3058 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3059 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -411,3 +411,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0: functions. [uwe 20240517] hp300: Installation CD ISO image is now bootable. [tsutsui 20240519] tic(1): Honour the user's umask (from RVP). [christos 20240520] + dhcpcd: Import version 10.0.7. [roy 20240524] +
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri May 24 11:30:29 UTC 2024 Modified Files: src/external/bsd/dhcpcd/dist/hooks: 30-hostname src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6.c ipv6nd.c logerr.c privsep.c Log Message: Sync with dhcpcd-10.0.7 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/hooks/30-hostname cvs rdiff -u -r1.50 -r1.51 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.32 -r1.33 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.54 -r1.55 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/src/if-bsd.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.36 -r1.37 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/src/ipv6.c \ src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/logerr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/hooks/30-hostname diff -u src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.6 src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.7 --- src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.6 Fri Apr 21 16:54:26 2023 +++ src/external/bsd/dhcpcd/dist/hooks/30-hostname Fri May 24 11:30:29 2024 @@ -118,7 +118,7 @@ set_hostname() *) hshort=true;; esac - need_hostname || return + need_hostname || return 0 if [ -n "$new_fqdn" ]; then if ${hfqdn} || ! ${hshort}; then Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.50 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.51 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.50 Mon Dec 18 15:51:28 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Fri May 24 11:30:29 2024 @@ -1877,13 +1877,13 @@ dhcp_discover(void *arg) dhcp_new_xid(ifp); eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); if (!(state->added & STATE_EXPIRED)) { - if (ifo->fallback) + if (ifo->fallback && ifo->fallback_time) eloop_timeout_add_sec(ifp->ctx->eloop, - ifo->reboot, dhcp_fallback, ifp); + ifo->fallback_time, dhcp_fallback, ifp); #ifdef IPV4LL else if (ifo->options & DHCPCD_IPV4LL) eloop_timeout_add_sec(ifp->ctx->eloop, - ifo->reboot, ipv4ll_start, ifp); + ifo->ipv4ll_time, ipv4ll_start, ifp); #endif } if (ifo->options & DHCPCD_REQUEST) @@ -1914,11 +1914,13 @@ dhcp_request(void *arg) { struct interface *ifp = arg; struct dhcp_state *state = D_STATE(ifp); + struct if_options *ifo = ifp->options; state->state = DHS_REQUEST; // Handle the server being silent to our request. - eloop_timeout_add_sec(ifp->ctx->eloop, ifp->options->reboot, - dhcp_requestfailed, ifp); + if (ifo->request_time != 0) + eloop_timeout_add_sec(ifp->ctx->eloop, ifo->request_time, + dhcp_requestfailed, ifp); send_request(ifp); } @@ -1944,7 +1946,11 @@ dhcp_expire(void *arg) static void dhcp_decline(struct interface *ifp) { + struct dhcp_state *state = D_STATE(ifp); + // Set the expired state so we send over BPF as this could be + // an address defence failure. + state->added |= STATE_EXPIRED; send_message(ifp, DHCP_DECLINE, NULL); } #endif @@ -2098,8 +2104,12 @@ static void dhcp_arp_defend_failed(struct arp_state *astate) { struct interface *ifp = astate->iface; + struct dhcp_state *state = D_STATE(ifp); + if (!(ifp->options->options & (DHCPCD_INFORM | DHCPCD_STATIC))) + dhcp_decline(ifp); dhcp_drop(ifp, "EXPIRED"); + dhcp_unlink(ifp->ctx, state->leasefile); dhcp_start1(ifp); } #endif @@ -2740,7 +2750,7 @@ dhcp_reboot(struct interface *ifp) /* Need to add this before dhcp_expire and friends. */ if (!ifo->fallback && ifo->options & DHCPCD_IPV4LL) eloop_timeout_add_sec(ifp->ctx->eloop, - ifo->reboot, ipv4ll_start, ifp); + ifo->ipv4ll_time, ipv4ll_start, ifp); #endif if (ifo->options & DHCPCD_LASTLEASE && state->lease.frominfo) @@ -3199,8 +3209,8 @@ dhcp_handledhcp(struct interface *ifp, s if (has_option_mask(ifo->requestmask, DHO_IPV6_PREFERRED_ONLY)) { if (get_option_uint32(ifp->ctx, _time, bootp, bootp_len, - DHO_IPV6_PREFERRED_ONLY) == 0 && - (state->state == DHS_DISCOVER || state->state == DHS_REBOOT)) + DHO_IPV6_PREFERRED_ONLY) == 0 && (state->state == DHS_DISCOVER || + state->state == DHS_REBOOT || state->state == DHS_NONE)) { char v6msg[128]; @@ -3524,12 +3534,6 @@ dhcp_handlebootp(struct interface *ifp, { size_t v; - if (len < offsetof(struct bootp, vend)) { - logerrx("%s: truncated packet (%zu) from %s", - ifp->n
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri May 24 11:30:29 UTC 2024 Modified Files: src/external/bsd/dhcpcd/dist/hooks: 30-hostname src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6.c ipv6nd.c logerr.c privsep.c Log Message: Sync with dhcpcd-10.0.7 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/hooks/30-hostname cvs rdiff -u -r1.50 -r1.51 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.32 -r1.33 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.54 -r1.55 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/src/if-bsd.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.36 -r1.37 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/src/ipv6.c \ src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/logerr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri May 24 11:28:32 UTC 2024 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv23810 Log Message: Update to dhcpcd-10.0.7 with the following changes: * DHCP: use request_time, fallback_time and ipv4ll_time rather than reboot timeout * DHCP6: Wait for IRT to elapse before requesting advertisments * DHCPv6: Don't re-INFORM if the RA changes * privsep: Reduce fd use * dhcpcd: Add support for arp persist defence * Move dhcp(v4) packet size check earlier * Define the Azure Endpoint and other site-specific options * add RFC4191 support by @goertzenator in #297 * dhcpcd: Respect IPV6_PREFERRED_ONLY flag regardless of state * Fix time_offset to be int to match RFC-2132 * hooks/30-hostname: Exit with 0 if setting hostname is not needed Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_7 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c C src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 10 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri May 24 11:28:32 UTC 2024 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv23810 Log Message: Update to dhcpcd-10.0.7 with the following changes: * DHCP: use request_time, fallback_time and ipv4ll_time rather than reboot timeout * DHCP6: Wait for IRT to elapse before requesting advertisments * DHCPv6: Don't re-INFORM if the RA changes * privsep: Reduce fd use * dhcpcd: Add support for arp persist defence * Move dhcp(v4) packet size check earlier * Define the Azure Endpoint and other site-specific options * add RFC4191 support by @goertzenator in #297 * dhcpcd: Respect IPV6_PREFERRED_ONLY flag regardless of state * Fix time_offset to be int to match RFC-2132 * hooks/30-hostname: Exit with 0 if setting hostname is not needed Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_7 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c C src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 10 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Mon Dec 18 16:03:26 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c Log Message: Fix import To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/src/bpf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Mon Dec 18 16:03:26 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c Log Message: Fix import To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/src/bpf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.21 src/external/bsd/dhcpcd/dist/src/bpf.c:1.22 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.21 Mon Dec 18 15:51:28 2023 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Mon Dec 18 16:03:26 2023 @@ -41,7 +41,6 @@ #define bpf_insn sock_filter #else #include -#include #endif #include @@ -316,34 +315,17 @@ ssize_t bpf_send(const struct bpf *bpf, uint16_t protocol, const void *data, size_t len) { - struct iovec iov[3]; + struct iovec iov[2]; struct ether_header eh; - struct ether_vlan_header evh; - const struct interface *ifp = bpf->bpf_ifp; - switch(ifp->hwtype) { + switch(bpf->bpf_ifp->hwtype) { case ARPHRD_ETHER: -#ifdef BSD - loginfox("%d", ifp->vlanid); - if (ifp->vlanid) { - memset(_dhost, 0xff, sizeof(evh.evl_dhost)); - memcpy(_shost, ifp->hwaddr, - sizeof(evh.evl_shost)); - evh.evl_proto = htons(protocol); - evh.evl_encap_proto = htons(ETHERTYPE_VLAN); - evh.evl_tag = htons(ifp->vlanid); - iov[0].iov_base = - iov[0].iov_len = sizeof(evh); - } else -#endif - { - memset(_dhost, 0xff, sizeof(eh.ether_dhost)); - memcpy(_shost, ifp->hwaddr, - sizeof(eh.ether_shost)); - eh.ether_type = htons(protocol); - iov[0].iov_base = - iov[0].iov_len = sizeof(eh); - } + memset(_dhost, 0xff, sizeof(eh.ether_dhost)); + memcpy(_shost, bpf->bpf_ifp->hwaddr, + sizeof(eh.ether_shost)); + eh.ether_type = htons(protocol); + iov[0].iov_base = + iov[0].iov_len = sizeof(eh); break; default: iov[0].iov_base = NULL; @@ -712,7 +694,7 @@ int bpf_bootp(const struct bpf *bpf, __unused const struct in_addr *ia) { -#ifdef BIOCSETWFx +#ifdef BIOCSETWF if (bpf_bootp_rw(bpf, true) == -1 || bpf_bootp_rw(bpf, false) == -1 || ioctl(bpf->bpf_fd, BIOCLOCK) == -1)
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Mon Dec 18 16:01:31 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv29955 Log Message: re-import dhcpcd-10.0.6 as 10.0.6a I mistakenly had a dirty checkout. Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_6a U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind No conflicts created by this import
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Mon Dec 18 16:01:31 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv29955 Log Message: re-import dhcpcd-10.0.6 as 10.0.6a I mistakenly had a dirty checkout. Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_6a U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind No conflicts created by this import
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Mon Dec 18 15:56:33 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv434 Log Message: Import dhcpcd-10.0.6 with the following changes: privsep: Stop proxying stderr to console and fix some detachment issues non-privsep: Fix launcher hangup DHCP6: Allow the invalid interface name - to mean don't assign an address from a delegated prefix DHCP6: Load the configuration for the interface being activated from prefix delegation Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_6 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 1 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Mon Dec 18 15:56:33 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv434 Log Message: Import dhcpcd-10.0.6 with the following changes: privsep: Stop proxying stderr to console and fix some detachment issues non-privsep: Fix launcher hangup DHCP6: Allow the invalid interface name - to mean don't assign an address from a delegated prefix DHCP6: Load the configuration for the interface being activated from prefix delegation Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_6 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 1 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/doc
Module Name:src Committed By: roy Date: Mon Dec 18 15:52:37 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note dhcpcd-10.0.6 To generate a diff of this commit: cvs rdiff -u -r1.1967 -r1.1968 src/doc/3RDPARTY cvs rdiff -u -r1.3022 -r1.3023 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1967 src/doc/3RDPARTY:1.1968 --- src/doc/3RDPARTY:1.1967 Mon Dec 18 15:42:26 2023 +++ src/doc/3RDPARTY Mon Dec 18 15:52:37 2023 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1967 2023/12/18 15:42:26 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1968 2023/12/18 15:52:37 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,13 +352,13 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 10.0.4 -Current Vers: 10.0.4 +Version: 10.0.6 +Current Vers: 10.0.6 Maintainer: roy Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Home Page: https://github.com/NetworkConfiguration/dhcpcd -Date: 2023-10-19 +Date: 2023-12-18 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3022 src/doc/CHANGES:1.3023 --- src/doc/CHANGES:1.3022 Wed Dec 13 08:20:04 2023 +++ src/doc/CHANGES Mon Dec 18 15:52:37 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3022 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3023 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -241,3 +241,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0: to be used VERY early in boot. [thorpej 20231203] kernel: Modularize compat90. [pgoyette 20231209] libsa: Add NFSv3 support. [mlelstv 20231212] + dhcpcd: Import version 10.0.6. [roy 20231218] +
CVS commit: src/doc
Module Name:src Committed By: roy Date: Mon Dec 18 15:52:37 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note dhcpcd-10.0.6 To generate a diff of this commit: cvs rdiff -u -r1.1967 -r1.1968 src/doc/3RDPARTY cvs rdiff -u -r1.3022 -r1.3023 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Mon Dec 18 15:51:28 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-options.c privsep.c Log Message: Sync with dhcpcd-10.0.6 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.49 -r1.50 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.31 -r1.32 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.53 -r1.54 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.35 -r1.36 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/privsep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.20 src/external/bsd/dhcpcd/dist/src/bpf.c:1.21 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.20 Wed Jul 19 13:53:03 2023 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Mon Dec 18 15:51:28 2023 @@ -41,6 +41,7 @@ #define bpf_insn sock_filter #else #include +#include #endif #include @@ -315,17 +316,34 @@ ssize_t bpf_send(const struct bpf *bpf, uint16_t protocol, const void *data, size_t len) { - struct iovec iov[2]; + struct iovec iov[3]; struct ether_header eh; + struct ether_vlan_header evh; + const struct interface *ifp = bpf->bpf_ifp; - switch(bpf->bpf_ifp->hwtype) { + switch(ifp->hwtype) { case ARPHRD_ETHER: - memset(_dhost, 0xff, sizeof(eh.ether_dhost)); - memcpy(_shost, bpf->bpf_ifp->hwaddr, - sizeof(eh.ether_shost)); - eh.ether_type = htons(protocol); - iov[0].iov_base = - iov[0].iov_len = sizeof(eh); +#ifdef BSD + loginfox("%d", ifp->vlanid); + if (ifp->vlanid) { + memset(_dhost, 0xff, sizeof(evh.evl_dhost)); + memcpy(_shost, ifp->hwaddr, + sizeof(evh.evl_shost)); + evh.evl_proto = htons(protocol); + evh.evl_encap_proto = htons(ETHERTYPE_VLAN); + evh.evl_tag = htons(ifp->vlanid); + iov[0].iov_base = + iov[0].iov_len = sizeof(evh); + } else +#endif + { + memset(_dhost, 0xff, sizeof(eh.ether_dhost)); + memcpy(_shost, ifp->hwaddr, + sizeof(eh.ether_shost)); + eh.ether_type = htons(protocol); + iov[0].iov_base = + iov[0].iov_len = sizeof(eh); + } break; default: iov[0].iov_base = NULL; @@ -694,7 +712,7 @@ int bpf_bootp(const struct bpf *bpf, __unused const struct in_addr *ia) { -#ifdef BIOCSETWF +#ifdef BIOCSETWFx if (bpf_bootp_rw(bpf, true) == -1 || bpf_bootp_rw(bpf, false) == -1 || ioctl(bpf->bpf_fd, BIOCLOCK) == -1) Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.49 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.50 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.49 Fri Oct 6 08:49:42 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Mon Dec 18 15:51:28 2023 @@ -1896,12 +1896,29 @@ dhcp_discover(void *arg) } static void +dhcp_requestfailed(void *arg) +{ + struct interface *ifp = arg; + struct dhcp_state *state = D_STATE(ifp); + + logwarnx("%s: failed to request the lease", ifp->name); + free(state->offer); + state->offer = NULL; + state->offer_len = 0; + state->interval = 0; + dhcp_discover(ifp); +} + +static void dhcp_request(void *arg) { struct interface *ifp = arg; struct dhcp_state *state = D_STATE(ifp); state->state = DHS_REQUEST; + // Handle the server being silent to our request. + eloop_timeout_add_sec(ifp->ctx->eloop, ifp->options->reboot, + dhcp_requestfailed, ifp); send_request(ifp); } Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.31 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.32 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.31 Fri Oct 6 08:49:42 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Mon Dec 18 15:51:28 2023 @@ -2589,21 +2589,17 @@ dhcp6_validatelease(struct interface *if } state->has_no_binding = false; nia = dhcp6_findia(ifp, m, len, sfrom, acquired); - if (nia == 0) { - if (state->state != DH6S_CONFIRM && ok_errno != 0) { - logerrx("%s: no useable IA found in lease", ifp->name); - return -1; - } - - /* We are confirming and have an OK, - * so look for ia's in our old lease. - * IA's must have existed here otherwise we would - * have rejected it earlier. */ - assert(state->new != NULL && state->new_len != 0); + if (nia == 0 && state->state == DH6S_CONFIRM && ok_errno == 0 && + state->new && state->new_len) + { state->has_no_binding = false; nia = dhcp6_findia(ifp, state->new, state->new_len, sfrom, acquired); } + if (nia == 0) { + logerrx("%s: no useable IA found in lease", ifp->name); + return -1; + } return nia; } @@ -
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Mon Dec 18 15:51:28 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-options.c privsep.c Log Message: Sync with dhcpcd-10.0.6 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.49 -r1.50 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.31 -r1.32 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.53 -r1.54 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.35 -r1.36 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/privsep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Mon Dec 18 15:49:43 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv21845 Log Message: Import dhcpcd-10.0.6 with the following changes: * privsep: Stop proxying stderr to console and fix some detachment issues * non-privsep: Fix launcher hangup * DHCP6: Allow the invalid interface name - to mean don't assign an address from a delegated prefix * DHCP6: Load the configuration for the interface being activated from prefix delegation Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_6 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 6 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Mon Dec 18 15:49:43 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv21845 Log Message: Import dhcpcd-10.0.6 with the following changes: * privsep: Stop proxying stderr to console and fix some detachment issues * non-privsep: Fix launcher hangup * DHCP6: Allow the invalid interface name - to mean don't assign an address from a delegated prefix * DHCP6: Load the configuration for the interface being activated from prefix delegation Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_6 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 6 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/doc
Module Name:src Committed By: roy Date: Thu Oct 19 11:27:57 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-10.0.4 To generate a diff of this commit: cvs rdiff -u -r1.1957 -r1.1958 src/doc/3RDPARTY cvs rdiff -u -r1.3006 -r1.3007 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1957 src/doc/3RDPARTY:1.1958 --- src/doc/3RDPARTY:1.1957 Sun Oct 8 21:08:05 2023 +++ src/doc/3RDPARTY Thu Oct 19 11:27:57 2023 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1957 2023/10/08 21:08:05 gutteridge Exp $ +# $NetBSD: 3RDPARTY,v 1.1958 2023/10/19 11:27:57 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,13 +352,13 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 10.0.3 -Current Vers: 10.0.3 +Version: 10.0.4 +Current Vers: 10.0.4 Maintainer: roy Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Home Page: https://github.com/NetworkConfiguration/dhcpcd -Date: 2023-10-06 +Date: 2023-10-19 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3006 src/doc/CHANGES:1.3007 --- src/doc/CHANGES:1.3006 Sat Oct 7 12:42:03 2023 +++ src/doc/CHANGES Thu Oct 19 11:27:57 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3006 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3007 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -226,7 +226,7 @@ Changes from NetBSD 10.0 to NetBSD 11.0: igc(4): Add initial support to Intel I225/I226 series Ethernet devices. [knakahara, rin, msaitoh 20231006] less: Updated to version 643. [simonb 20231006] - dhcpcd: Import version 10.0.3. [roy 20231006] gcc.old: Initial import of major vax toolchain fix by Kalvis Duckmanton. [rin 20231007] + dhcpcd: Import version 10.0.4. [roy 20231019]
CVS commit: src/doc
Module Name:src Committed By: roy Date: Thu Oct 19 11:27:57 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-10.0.4 To generate a diff of this commit: cvs rdiff -u -r1.1957 -r1.1958 src/doc/3RDPARTY cvs rdiff -u -r1.3006 -r1.3007 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Thu Oct 19 11:26:52 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcpcd.c privsep.c script.c Log Message: Sync with dhcpcd-10.0.4 To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/src/privsep.c \ src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.52 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.53 --- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.52 Fri Oct 6 08:49:42 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Thu Oct 19 11:26:52 2023 @@ -329,6 +329,36 @@ dhcpcd_ipwaited(struct dhcpcd_ctx *ctx) return 1; } +#ifndef THERE_IS_NO_FORK +void +dhcpcd_daemonised(struct dhcpcd_ctx *ctx) +{ + unsigned int logopts = loggetopts(); + + /* + * Stop writing to stderr. + * On the happy path, only the manager process writes to stderr, + * so this just stops wasting fprintf calls to nowhere. + * All other calls - ie errors in privsep processes or script output, + * will error when printing. + * If we *really* want to fix that, then we need to suck + * stderr/stdout in the manager process and either discard it or pass + * it to the launcher process and then to stderr. + */ + logopts &= ~LOGERR_ERR; + logsetopts(logopts); + + /* + * We need to do something with stdout/stderr to avoid SIGPIPE + * We know that stdin is already mapped to /dev/null + */ + dup2(STDIN_FILENO, STDOUT_FILENO); + dup2(STDIN_FILENO, STDERR_FILENO); + + ctx->options |= DHCPCD_DAEMONISED; +} +#endif + /* Returns the pid of the child, otherwise 0. */ void dhcpcd_daemonise(struct dhcpcd_ctx *ctx) @@ -363,6 +393,13 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx) if (!(logopts & LOGERR_QUIET) && ctx->stderr_valid) (void)fprintf(stderr, "forked to background, child pid %d\n", getpid()); + +#ifdef PRIVSEP + ps_daemonised(ctx); +#else + dhcpcd_daemonised(ctx); +#endif + i = EXIT_SUCCESS; if (write(ctx->fork_fd, , sizeof(i)) == -1) logerr("write"); @@ -370,19 +407,6 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx) eloop_event_delete(ctx->eloop, ctx->fork_fd); close(ctx->fork_fd); ctx->fork_fd = -1; - - /* - * Stop writing to stderr. - * On the happy path, only the manager process writes to stderr, - * so this just stops wasting fprintf calls to nowhere. - * All other calls - ie errors in privsep processes or script output, - * will error when printing. - * If we *really* want to fix that, then we need to suck - * stderr/stdout in the manager process and either disacrd it or pass - * it to the launcher process and then to stderr. - */ - logopts &= ~LOGERR_ERR; - logsetopts(logopts); #endif } @@ -1869,6 +1893,22 @@ dhcpcd_pidfile_timeout(void *arg) dhcpcd_pidfile_timeout, ctx); } +static int dup_null(int fd) +{ + int fd_null = open(_PATH_DEVNULL, O_WRONLY); + int err; + + if (fd_null == -1) { + logwarn("open %s", _PATH_DEVNULL); + return -1; + } + + if ((err = dup2(fd_null, fd)) == -1) + logwarn("dup2 %d", fd); + close(fd_null); + return err; +} + int main(int argc, char **argv, char **envp) { @@ -1972,6 +2012,15 @@ main(int argc, char **argv, char **envp) ctx.stdout_valid = fcntl(STDOUT_FILENO, F_GETFD) != -1; ctx.stderr_valid = fcntl(STDERR_FILENO, F_GETFD) != -1; + /* Even we if we don't have input/outputs, we need to + * ensure they are setup for shells. */ + if (!ctx.stdin_valid) + dup_null(STDIN_FILENO); + if (!ctx.stdout_valid) + dup_null(STDOUT_FILENO); + if (!ctx.stderr_valid) + dup_null(STDERR_FILENO); + logopts = LOGERR_LOG | LOGERR_LOG_DATE | LOGERR_LOG_PID; if (ctx.stderr_valid) logopts |= LOGERR_ERR; @@ -2341,8 +2390,10 @@ printpidfile: } loginfox(PACKAGE "-" VERSION " starting"); - if (ctx.stdin_valid && freopen(_PATH_DEVNULL, "w", stdin) == NULL) - logwarn("freopen stdin"); + + // We don't need stdin past this point + if (ctx.stdin_valid) + dup_null(STDIN_FILENO); #if defined(USE_SIGNALS) && !defined(THERE_IS_NO_FORK) if (!(ctx.options & DHCPCD_DAEMONISE)) @@ -2385,10 +2436,9 @@ printpidfile: logerr("dup2"); close(stderr_fd[0]); close(stderr_fd[1]); - } else if (ctx.stdout_valid) { - if (freopen(_PATH_DEVNULL, "w", stdout) == NULL) -logerr("freopen stdout"); - } + } else if (ctx.stdout_valid) + dup_null(STDOUT_FILENO); + if (setsid() == -1) { logerr("%s: setsid", __func__); goto exit_failure; Index: src/external/bsd/dhcpcd/dist/src/privsep.c diff -u src/external/bsd/dhcpcd/dist/src/privsep.c:1.16 src/external/bsd/dhcpcd/di
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Thu Oct 19 11:26:52 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcpcd.c privsep.c script.c Log Message: Sync with dhcpcd-10.0.4 To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/src/privsep.c \ src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Thu Oct 19 11:25:19 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv5255 Log Message: Import dhcpcd-10.0.4 with the following change: privsep: Notify processes that dhcpcd has daemonised so they dup stdout and stderr to /dev/null. This avoids scripts failing with SIGPIPE if they try and write to these streams. Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_4 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Thu Oct 19 11:25:19 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv5255 Log Message: Import dhcpcd-10.0.4 with the following change: privsep: Notify processes that dhcpcd has daemonised so they dup stdout and stderr to /dev/null. This avoids scripts failing with SIGPIPE if they try and write to these streams. Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_4 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Oct 6 08:53:14 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to dhcpcd-10.0.3 To generate a diff of this commit: cvs rdiff -u -r1.1955 -r1.1956 src/doc/3RDPARTY cvs rdiff -u -r1.3002 -r1.3003 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1955 src/doc/3RDPARTY:1.1956 --- src/doc/3RDPARTY:1.1955 Tue Sep 26 21:38:11 2023 +++ src/doc/3RDPARTY Fri Oct 6 08:53:14 2023 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1955 2023/09/26 21:38:11 gutteridge Exp $ +# $NetBSD: 3RDPARTY,v 1.1956 2023/10/06 08:53:14 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,13 +352,13 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 10.0.2 -Current Vers: 10.0.2 +Version: 10.0.3 +Current Vers: 10.0.3 Maintainer: roy Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Home Page: https://github.com/NetworkConfiguration/dhcpcd -Date: 2023-07-19 +Date: 2023-10-06 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3002 src/doc/CHANGES:1.3003 --- src/doc/CHANGES:1.3002 Fri Oct 6 06:03:52 2023 +++ src/doc/CHANGES Fri Oct 6 08:53:14 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3002 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3003 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -224,3 +224,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0: namecache: Tune the namecache for 32-bit systems [ad 20230909] tzcode: Updated to 2023c. [christos 20230916] less: Updated to version 643. [simonb 20231006] + dhcpcd: Import version 10.0.3. [roy 20231006] +
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Oct 6 08:53:14 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to dhcpcd-10.0.3 To generate a diff of this commit: cvs rdiff -u -r1.1955 -r1.1956 src/doc/3RDPARTY cvs rdiff -u -r1.3002 -r1.3003 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Fri Oct 6 08:49:42 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.c if-options.c ipv6nd.c privsep.c Log Message: sync with dhcpcd-10.0.3 To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.51 -r1.52 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.34 -r1.35 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/privsep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.48 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.49 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.48 Wed Jul 19 13:53:03 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Fri Oct 6 08:49:42 2023 @@ -3314,7 +3314,8 @@ dhcp_handledhcp(struct interface *ifp, s state->reason = "TEST"; script_runreason(ifp, state->reason); eloop_exit(ifp->ctx->eloop, EXIT_SUCCESS); - state->bpf->bpf_flags |= BPF_EOF; + if (state->bpf) +state->bpf->bpf_flags |= BPF_EOF; return; } eloop_timeout_delete(ifp->ctx->eloop, send_discover, ifp); Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.30 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.31 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.30 Wed Jul 19 13:53:03 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Fri Oct 6 08:49:42 2023 @@ -1022,9 +1022,11 @@ dhcp6_makemessage(struct interface *ifp) n--; while (n-- > 0) *ep++ = *pp--; - if (u8) + n = (size_t)(ep - exb); + if (u8) { *ep = (uint8_t)(*pp << u8); - n++; + n++; + } COPYIN(D6_OPTION_PD_EXCLUDE, exb, (uint16_t)n); ia_na_len = (uint16_t) @@ -1628,6 +1630,7 @@ dhcp6_startdiscover(void *arg) struct interface *ifp; struct dhcp6_state *state; int llevel; + struct ipv6_addr *ia; ifp = arg; state = D6_STATE(ifp); @@ -1652,6 +1655,14 @@ dhcp6_startdiscover(void *arg) state->new = NULL; state->new_len = 0; + /* If we fail to renew or confirm, our requested addreses will + * be marked as stale. + To re-request them, just mark them as not stale. */ + TAILQ_FOREACH(ia, >addrs, next) { + if (ia->flags & IPV6_AF_REQUEST) + ia->flags &= ~IPV6_AF_STALE; + } + if (dhcp6_makemessage(ifp) == -1) logerr("%s: %s", __func__, ifp->name); else @@ -2268,9 +2279,7 @@ dhcp6_findpd(struct interface *ifp, cons } else { if (!(a->flags & IPV6_AF_DELEGATEDPFX)) a->flags |= IPV6_AF_NEW | IPV6_AF_DELEGATEDPFX; - a->flags &= ~(IPV6_AF_STALE | - IPV6_AF_EXTENDED | - IPV6_AF_REQUEST); + a->flags &= ~(IPV6_AF_STALE | IPV6_AF_EXTENDED); if (a->prefix_vltime != pdp.vltime) a->flags |= IPV6_AF_NEW; } Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.51 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.52 --- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.51 Wed Jul 19 13:53:03 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Fri Oct 6 08:49:42 2023 @@ -75,6 +75,9 @@ static const char dhcpcd_copyright[] = " #ifdef HAVE_CAPSICUM #include #endif +#ifdef HAVE_OPENSSL +#include +#endif #ifdef HAVE_UTIL_H #include #endif @@ -1411,6 +1414,7 @@ dhcpcd_renew(struct dhcpcd_ctx *ctx) #ifdef USE_SIGNALS #define sigmsg "received %s, %s" +static volatile bool dhcpcd_exiting = false; void dhcpcd_signal_cb(int sig, void *arg) { @@ -1483,9 +1487,20 @@ dhcpcd_signal_cb(int sig, void *arg) return; } + /* + * Privsep has a mini-eloop for reading data from other processes. + * This mini-eloop processes signals as well so we can reap children. + * During teardown we don't want to process SIGTERM or SIGINT again, + * as that could trigger memory issues. + */ + if (dhcpcd_exiting) + return; + + dhcpcd_exiting = true; if (!(ctx->options & DHCPCD_TEST)) stop_all_interfaces(ctx, opts); eloop_exit(ctx->eloop, exit_code); + dhcpcd_exiting = false; } #endif @@ -1495,7 +1510,7 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx { struct interface *ifp; unsigned long long opts; - int opt, oi, do_reboot, do_renew, af = AF_UNSPEC; + int opt, oi, oifind, do_reboot, do_renew, af = AF_UNSPEC; size_t len, l, nifaces; char *tmp, *p; @@ -1511,7 +1526,7 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx return control_queue(fd, UNCONST(fd->ctx->cffile), strlen(fd->ctx->cffile) + 1); } else if (strcmp(*argv, "--getinterfac
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Fri Oct 6 08:49:42 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.c if-options.c ipv6nd.c privsep.c Log Message: sync with dhcpcd-10.0.3 To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.51 -r1.52 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.34 -r1.35 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/privsep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Oct 6 08:46:23 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv14109 Log Message: Import dhcpcd-10.0.3 with the following changes: DHCP: Don't crash on a test run dhcpcd: Fix off-by-one overflow when read() writes full BUFSIZ privsep: fix strlcpy overflow in psp_ifname privsep: Fix a FD leak when processes exit dhcpcd: Use a local variable instead of the optind dhcpcd: Guard against handling many SIGTERM/SIGINT DHCP6: Send correct amount of used buffer for prefix exclude option options: andsf6 is DHCPv6, not DHCP options: introduce the uri option as opposed to a string DHCP6: Set all requested addrs as not stale when starting discovery Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_3 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 6 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Oct 6 08:46:23 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv14109 Log Message: Import dhcpcd-10.0.3 with the following changes: DHCP: Don't crash on a test run dhcpcd: Fix off-by-one overflow when read() writes full BUFSIZ privsep: fix strlcpy overflow in psp_ifname privsep: Fix a FD leak when processes exit dhcpcd: Use a local variable instead of the optind dhcpcd: Guard against handling many SIGTERM/SIGINT DHCP6: Send correct amount of used buffer for prefix exclude option options: andsf6 is DHCPv6, not DHCP options: introduce the uri option as opposed to a string DHCP6: Set all requested addrs as not stale when starting discovery Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_3 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 6 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/doc
Module Name:src Committed By: roy Date: Wed Jul 19 13:59:02 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-10.0.2 To generate a diff of this commit: cvs rdiff -u -r1.1938 -r1.1939 src/doc/3RDPARTY cvs rdiff -u -r1.2980 -r1.2981 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: roy Date: Wed Jul 19 13:59:02 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-10.0.2 To generate a diff of this commit: cvs rdiff -u -r1.1938 -r1.1939 src/doc/3RDPARTY cvs rdiff -u -r1.2980 -r1.2981 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1938 src/doc/3RDPARTY:1.1939 --- src/doc/3RDPARTY:1.1938 Sat Jul 15 19:59:21 2023 +++ src/doc/3RDPARTY Wed Jul 19 13:59:01 2023 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1938 2023/07/15 19:59:21 mrg Exp $ +# $NetBSD: 3RDPARTY,v 1.1939 2023/07/19 13:59:01 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,13 +352,13 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 10.0.1 -Current Vers: 10.0.1 +Version: 10.0.2 +Current Vers: 10.0.2 Maintainer: roy Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Home Page: https://github.com/NetworkConfiguration/dhcpcd -Date: 2023-04-21 +Date: 2023-07-19 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2980 src/doc/CHANGES:1.2981 --- src/doc/CHANGES:1.2980 Sat Jul 15 19:59:21 2023 +++ src/doc/CHANGES Wed Jul 19 13:59:01 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2980 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2981 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -161,3 +161,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0: [nia 20230629] openpam(3): update to 20230627 (ximenia) [christos 20230630] gcc(1): Import GCC 10.5. [mrg 20230710] + dhcpcd: Import version 10.0.2. [roy 20230719]
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Wed Jul 19 13:53:03 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c privsep.c script.c Log Message: Sync with dhcpcd-10.0.2 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.47 -r1.48 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.50 -r1.51 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.33 -r1.34 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.14 -r1.15 src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Wed Jul 19 13:53:03 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c privsep.c script.c Log Message: Sync with dhcpcd-10.0.2 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.47 -r1.48 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.50 -r1.51 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.33 -r1.34 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.14 -r1.15 src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.19 src/external/bsd/dhcpcd/dist/src/bpf.c:1.20 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.19 Fri Apr 21 16:54:26 2023 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Wed Jul 19 13:53:03 2023 @@ -610,16 +610,19 @@ static const struct bpf_insn bpf_bootp_b #define BPF_BOOTP_BASE_LEN __arraycount(bpf_bootp_base) static const struct bpf_insn bpf_bootp_read[] = { - /* Make sure it's from and to the right port. */ - BPF_STMT(BPF_LD + BPF_W + BPF_IND, 0), - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (BOOTPS << 16) + BOOTPC, 1, 0), + /* Make sure it's to the right port. + * RFC2131 makes no mention of enforcing a source port. */ + BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct udphdr, uh_dport)), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, BOOTPC, 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), }; #define BPF_BOOTP_READ_LEN __arraycount(bpf_bootp_read) #ifdef BIOCSETWF static const struct bpf_insn bpf_bootp_write[] = { - /* Make sure it's from and to the right port. */ + /* Make sure it's from and to the right port. + * RFC2131 makes no mention of encforcing a source port, + * but dhcpcd does enforce it for sending. */ BPF_STMT(BPF_LD + BPF_W + BPF_IND, 0), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (BOOTPC << 16) + BOOTPS, 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.47 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.48 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.47 Fri Apr 21 16:54:26 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Wed Jul 19 13:53:03 2023 @@ -3436,8 +3436,8 @@ is_packet_udp_bootp(void *packet, size_t if (ip_hlen + ntohs(udp.uh_ulen) > plen) return false; - /* Check it's to and from the right ports. */ - if (udp.uh_dport != htons(BOOTPC) || udp.uh_sport != htons(BOOTPS)) + /* Check it's to the right port. */ + if (udp.uh_dport != htons(BOOTPC)) return false; return true; Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.29 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.30 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.29 Fri Apr 21 16:54:26 2023 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Wed Jul 19 13:53:03 2023 @@ -1667,10 +1667,7 @@ dhcp6_startinform(void *arg) ifp = arg; state = D6_STATE(ifp); - if (state->new_start || (state->new == NULL && !state->failed)) - llevel = LOG_INFO; - else - llevel = LOG_DEBUG; + llevel = state->failed ? LOG_DEBUG : LOG_INFO; logmessage(llevel, "%s: requesting DHCPv6 information", ifp->name); state->state = DH6S_INFORM; state->RTC = 0; @@ -3069,7 +3066,7 @@ dhcp6_bind(struct interface *ifp, const int loglevel; struct timespec now; - if (state->state == DH6S_RENEW && !state->new_start) { + if (state->state == DH6S_RENEW) { loglevel = LOG_DEBUG; TAILQ_FOREACH(ia, >addrs, next) { if (ia->flags & IPV6_AF_NEW) { @@ -3968,8 +3965,10 @@ dhcp6_start(struct interface *ifp, enum { /* We don't want log spam when the RA * has just adjusted it's prefix times. */ -if (state->state != DH6S_INFORMED) +if (state->state != DH6S_INFORMED) { state->new_start = true; + state->failed = false; +} dhcp6_startinform(ifp); } break; Index: src/external/bsd/dhcpcd/dist/src/if-bsd.c diff -u src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.29 src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.30 --- src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.29 Thu Apr 27 13:21:59 2023 +++ src/external/bsd/dhcpcd/dist/src/if-bsd.c Wed Jul 19 13:53:03 2023 @@ -154,6 +154,9 @@ if_opensockets_os(struct dhcpcd_ctx *ctx #ifdef RTM_CHGADDR RTM_CHGADDR, #endif +#ifdef RTM_DESYNC + RTM_DESYNC, +#endif RTM_NEWADDR, RTM_DELADDR }; #ifdef ROUTE_MSGFILTER @@ -1332,6 +1335,11 @@ if_ifa(struct dhcpcd_ctx *ctx, const str ifam->ifam_msglen - sizeof
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Wed Jul 19 13:51:09 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv25568 Log Message: Import dhcpcd-10.0.2 with the following changes: * BSD: When we get RTM_NEWADDR the interface must have IFF_UP * BSD: Fix non INET6 builds * DHCP: Don't enforce the message came port 67 * privsep: Allow zero length messages through * dhcpcd: deal with HANGUP and EPIPE better * dhcpcd: Fix waitip address family * privsep: Check if we have a root process before sending it stuff * privsep: Only unlink control sockets if we created them * common: Improve valid_domain and check correct return * common: Allow hwaddr_ntoa to print an empty string * privsep: Send only what we have put in the buffer to script env Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_2 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 8 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Wed Jul 19 13:51:09 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv25568 Log Message: Import dhcpcd-10.0.2 with the following changes: * BSD: When we get RTM_NEWADDR the interface must have IFF_UP * BSD: Fix non INET6 builds * DHCP: Don't enforce the message came port 67 * privsep: Allow zero length messages through * dhcpcd: deal with HANGUP and EPIPE better * dhcpcd: Fix waitip address family * privsep: Check if we have a root process before sending it stuff * privsep: Only unlink control sockets if we created them * common: Improve valid_domain and check correct return * common: Allow hwaddr_ntoa to print an empty string * privsep: Send only what we have put in the buffer to script env Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_2 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 8 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/doc
Module Name:src Committed By: roy Date: Tue Jun 27 17:10:15 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to openresolv-3.13.2 To generate a diff of this commit: cvs rdiff -u -r1.1933 -r1.1934 src/doc/3RDPARTY cvs rdiff -u -r1.2974 -r1.2975 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: roy Date: Tue Jun 27 17:10:15 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to openresolv-3.13.2 To generate a diff of this commit: cvs rdiff -u -r1.1933 -r1.1934 src/doc/3RDPARTY cvs rdiff -u -r1.2974 -r1.2975 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1933 src/doc/3RDPARTY:1.1934 --- src/doc/3RDPARTY:1.1933 Mon Jun 26 22:04:18 2023 +++ src/doc/3RDPARTY Tue Jun 27 17:10:15 2023 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1933 2023/06/26 22:04:18 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1934 2023/06/27 17:10:15 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1047,13 +1047,12 @@ Location: external/bsd/openpam/dist Notes: Package: openresolv -Version: 3.12.0 -Current Vers: 3.12.0 +Version: 3.13.2 +Current Vers: 3.13.2 Maintainer: roy -Archive Site: ftp://roy.marples.name/pub/openresolv/ +Archive Site: https://github.com/NetworkConfiguration/openresolv/releases Home Page: http://roy.marples.name/projects/openresolv/ -Date: 2020-12-27 -Mailing List: openresolv-disc...@marples.name +Date: 2023-06-27 License: BSD (2-clause) Location: external/bsd/openresolv/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2974 src/doc/CHANGES:1.2975 --- src/doc/CHANGES:1.2974 Mon Jun 26 22:04:19 2023 +++ src/doc/CHANGES Tue Jun 27 17:10:15 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2974 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2975 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -134,3 +134,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0: [nikita 20230608] kerberos(8): Update to Heimdal-7.8.0 [christos 20230619] bind: Import version 9.16.42. [christos 20230626] + openresolv: Import version 3.13.2 [roy 20230627]
CVS commit: src/external/bsd/openresolv/dist
Module Name:src Committed By: roy Date: Tue Jun 27 17:07:53 UTC 2023 Modified Files: src/external/bsd/openresolv/dist: dnsmasq.in libc.in named.in pdnsd.in resolvconf.8.in resolvconf.conf.5.in resolvconf.in unbound.in Log Message: Sync with openresolv-3.13.2 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/openresolv/dist/dnsmasq.in cvs rdiff -u -r1.5 -r1.6 src/external/bsd/openresolv/dist/libc.in cvs rdiff -u -r1.4 -r1.5 src/external/bsd/openresolv/dist/named.in \ src/external/bsd/openresolv/dist/pdnsd.in cvs rdiff -u -r1.11 -r1.12 src/external/bsd/openresolv/dist/resolvconf.8.in cvs rdiff -u -r1.21 -r1.22 \ src/external/bsd/openresolv/dist/resolvconf.conf.5.in cvs rdiff -u -r1.9 -r1.10 src/external/bsd/openresolv/dist/resolvconf.in cvs rdiff -u -r1.3 -r1.4 src/external/bsd/openresolv/dist/unbound.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/openresolv/dist
Module Name:src Committed By: roy Date: Tue Jun 27 17:07:53 UTC 2023 Modified Files: src/external/bsd/openresolv/dist: dnsmasq.in libc.in named.in pdnsd.in resolvconf.8.in resolvconf.conf.5.in resolvconf.in unbound.in Log Message: Sync with openresolv-3.13.2 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/openresolv/dist/dnsmasq.in cvs rdiff -u -r1.5 -r1.6 src/external/bsd/openresolv/dist/libc.in cvs rdiff -u -r1.4 -r1.5 src/external/bsd/openresolv/dist/named.in \ src/external/bsd/openresolv/dist/pdnsd.in cvs rdiff -u -r1.11 -r1.12 src/external/bsd/openresolv/dist/resolvconf.8.in cvs rdiff -u -r1.21 -r1.22 \ src/external/bsd/openresolv/dist/resolvconf.conf.5.in cvs rdiff -u -r1.9 -r1.10 src/external/bsd/openresolv/dist/resolvconf.in cvs rdiff -u -r1.3 -r1.4 src/external/bsd/openresolv/dist/unbound.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/openresolv/dist/dnsmasq.in diff -u src/external/bsd/openresolv/dist/dnsmasq.in:1.6 src/external/bsd/openresolv/dist/dnsmasq.in:1.7 --- src/external/bsd/openresolv/dist/dnsmasq.in:1.6 Mon Jan 27 21:13:05 2020 +++ src/external/bsd/openresolv/dist/dnsmasq.in Tue Jun 27 17:07:53 2023 @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2020 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # dnsmasq subscriber for resolvconf @@ -105,7 +105,7 @@ for d in $DOMAINS; do empty=true continue fi - i=$(($i + 1)) + i=$((i + 1)) while [ ${#addr} -lt 4 ]; do addr="0${addr}" done @@ -118,7 +118,7 @@ for d in $DOMAINS; do fi done while [ $i != 8 ]; do -i=$(($i + 1)) +i=$((i + 1)) front="$front byte:0 byte:0" done front="${front}$back" @@ -151,7 +151,7 @@ else fi # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv" else @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv" Index: src/external/bsd/openresolv/dist/libc.in diff -u src/external/bsd/openresolv/dist/libc.in:1.5 src/external/bsd/openresolv/dist/libc.in:1.6 --- src/external/bsd/openresolv/dist/libc.in:1.5 Mon Jan 27 21:13:05 2020 +++ src/external/bsd/openresolv/dist/libc.in Tue Jun 27 17:07:53 2023 @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2020 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # libc subscriber for resolvconf @@ -94,6 +94,7 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; th fi fi : ${resolv_conf:=/etc/resolv.conf} +: ${resolv_conf_tmp:="$resolv_conf.$$.openresolv"} : ${libc_service:=nscd} : ${list_resolv:=@SBINDIR@/resolvconf -l} if [ "${resolv_conf_head-x}" = x ] && [ -f "$SYSCONFDIR"/resolv.conf.head ] @@ -107,7 +108,7 @@ fi backup=true signature="# Generated by resolvconf" - + uniqify() { result= @@ -226,8 +227,26 @@ if $backup; then fi fi -# Create our resolv.conf now -(umask 022; printf %s "$newconf" >"$resolv_conf") +# There are pros and cons for writing directly to resolv.conf +# instead of a temporary file and then moving it over. +# The default is to write to resolv.conf as it has the least +# issues and has been the long standing default behaviour. +case "${resolv_conf_mv:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + # Protect against symlink attack, ensure new file does not exist + rm -f "$resolv_conf_tmp" + # Keep original file owner, group and mode + [ -r "$resolv_conf" ] && cp -p "$resolv_conf" "$resolv_conf_tmp" + # Create our resolv.conf now + if (umask 022; printf %s "$newconf" >"$resolv_conf_tmp"); then + mv "$resolv_conf_tmp" "$resolv_conf" + fi + ;; +*) + (umask 022; printf %s "$newconf" >"$resolv_conf") + ;; +esac + if [ -n "$libc_restart" ]; then eval $libc_restart elif [ -n "$RESTARTCMD" ]; then Index: src/external/bsd/openresolv/dist/named.in diff -u src/external/bsd/openresolv/dist/named.in:1.4 src/external/bsd/openresolv/dist/named.in:1.5 --- src/external/bsd/openresolv/dist/named.in:1.4 Mon Jan 27 21:13:05 2020 +++ src/external/bsd/openresolv/dist/named.in Tue Jun 27 17:07:53 2023 @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2020 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # named subscriber for resolvconf @@ -79,7 +79,7 @@ for d in $DOMAINS; do done # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$named_options&
CVS import: src/external/bsd/openresolv/dist
Module Name:src Committed By: roy Date: Tue Jun 27 17:04:19 UTC 2023 Update of /cvsroot/src/external/bsd/openresolv/dist In directory ivanova.netbsd.org:/tmp/cvs-serv9801 Log Message: openresolv: Update to 3.13.2 with the following changes: * Do not return error from -i when no interfaces are configured * unbound can now add generic options to forward zones Status: Vendor Tag: ROY Release Tags: openresolv-3_13_2 U src/external/bsd/openresolv/dist/LICENSE U src/external/bsd/openresolv/dist/README.md C src/external/bsd/openresolv/dist/resolvconf.in C src/external/bsd/openresolv/dist/resolvconf.8.in C src/external/bsd/openresolv/dist/resolvconf.conf.5.in C src/external/bsd/openresolv/dist/libc.in C src/external/bsd/openresolv/dist/dnsmasq.in C src/external/bsd/openresolv/dist/named.in C src/external/bsd/openresolv/dist/pdnsd.in U src/external/bsd/openresolv/dist/pdns_recursor.in C src/external/bsd/openresolv/dist/unbound.in U src/external/bsd/openresolv/dist/avahi-daemon.in U src/external/bsd/openresolv/dist/mdnsd.in U src/external/bsd/openresolv/dist/resolvconf.conf 8 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/openresolv/dist
CVS import: src/external/bsd/openresolv/dist
Module Name:src Committed By: roy Date: Tue Jun 27 17:04:19 UTC 2023 Update of /cvsroot/src/external/bsd/openresolv/dist In directory ivanova.netbsd.org:/tmp/cvs-serv9801 Log Message: openresolv: Update to 3.13.2 with the following changes: * Do not return error from -i when no interfaces are configured * unbound can now add generic options to forward zones Status: Vendor Tag: ROY Release Tags: openresolv-3_13_2 U src/external/bsd/openresolv/dist/LICENSE U src/external/bsd/openresolv/dist/README.md C src/external/bsd/openresolv/dist/resolvconf.in C src/external/bsd/openresolv/dist/resolvconf.8.in C src/external/bsd/openresolv/dist/resolvconf.conf.5.in C src/external/bsd/openresolv/dist/libc.in C src/external/bsd/openresolv/dist/dnsmasq.in C src/external/bsd/openresolv/dist/named.in C src/external/bsd/openresolv/dist/pdnsd.in U src/external/bsd/openresolv/dist/pdns_recursor.in C src/external/bsd/openresolv/dist/unbound.in U src/external/bsd/openresolv/dist/avahi-daemon.in U src/external/bsd/openresolv/dist/mdnsd.in U src/external/bsd/openresolv/dist/resolvconf.conf 8 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/openresolv/dist
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Thu Apr 27 13:21:59 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: if-bsd.c Log Message: dhcpcd: Fix non INET6 builds. Thanks to J. Hannken-Illjes for the fix. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/external/bsd/dhcpcd/dist/src/if-bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/if-bsd.c diff -u src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.28 src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.29 --- src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.28 Fri Apr 21 16:54:26 2023 +++ src/external/bsd/dhcpcd/dist/src/if-bsd.c Thu Apr 27 13:21:59 2023 @@ -167,15 +167,13 @@ if_opensockets_os(struct dhcpcd_ctx *ctx #ifdef INET6 priv->pf_inet6_fd = xsocket(PF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); -#ifdef PRIVSEP_RIGHTS - if (IN_PRIVSEP(ctx)) - ps_rights_limit_ioctl(priv->pf_inet6_fd); -#endif /* Don't return an error so we at least work on kernels witout INET6 * even though we expect INET6 support. * We will fail noisily elsewhere anyway. */ -#else - priv->pf_inet6_fd = -1; +#ifdef PRIVSEP_RIGHTS + if (priv->pf_inet6_fd != -1 && IN_PRIVSEP(ctx)) + ps_rights_limit_ioctl(priv->pf_inet6_fd); +#endif #endif ctx->link_fd = xsocket(PF_ROUTE, SOCK_RAW | SOCK_CXNB, AF_UNSPEC); @@ -234,8 +232,10 @@ if_closesockets_os(struct dhcpcd_ctx *ct struct priv *priv; priv = (struct priv *)ctx->priv; +#ifdef INET6 if (priv->pf_inet6_fd != -1) close(priv->pf_inet6_fd); +#endif #if defined(SIOCALIFADDR) && defined(IFLR_ACTIVE) /*NetBSD */ if (priv->pf_link_fd != -1) close(priv->pf_link_fd);
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Thu Apr 27 13:21:59 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/src: if-bsd.c Log Message: dhcpcd: Fix non INET6 builds. Thanks to J. Hannken-Illjes for the fix. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/external/bsd/dhcpcd/dist/src/if-bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Apr 21 17:00:06 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to dhcpcd-10.0.1 To generate a diff of this commit: cvs rdiff -u -r1.1921 -r1.1922 src/doc/3RDPARTY cvs rdiff -u -r1.2960 -r1.2961 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1921 src/doc/3RDPARTY:1.1922 --- src/doc/3RDPARTY:1.1921 Tue Apr 18 09:56:57 2023 +++ src/doc/3RDPARTY Fri Apr 21 17:00:05 2023 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1921 2023/04/18 09:56:57 nikita Exp $ +# $NetBSD: 3RDPARTY,v 1.1922 2023/04/21 17:00:05 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,13 +352,13 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 9.4.1 -Current Vers: 9.4.1 +Version: 10.0.1 +Current Vers: 10.0.1 Maintainer: roy -Archive Site: https://roy.marples.name/downloads/dhcpcd/ +Archive Site: https://github.com/NetworkConfiguration/dhcpcd/releases Home Page: https://roy.marples.name/projects/dhcpcd/ Home Page: https://github.com/NetworkConfiguration/dhcpcd -Date: 2021-10-22 +Date: 2023-04-21 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2960 src/doc/CHANGES:1.2961 --- src/doc/CHANGES:1.2960 Mon Apr 17 10:27:37 2023 +++ src/doc/CHANGES Fri Apr 21 17:00:05 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2960 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2961 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -84,3 +84,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0: lua: Import version 5.4.4. Bumped shlib major because of incompatible API/ABI changes. [nikita 20230416] + dhcpcd: Import version 10.0.1. [roy 20230421] +
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Apr 21 17:00:06 UTC 2023 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to dhcpcd-10.0.1 To generate a diff of this commit: cvs rdiff -u -r1.1921 -r1.1922 src/doc/3RDPARTY cvs rdiff -u -r1.2960 -r1.2961 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Apr 21 16:54:26 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/hooks: 20-resolv.conf 29-lookup-hostname 30-hostname 50-ntp.conf src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6.c ipv6.h ipv6nd.c logerr.c privsep.c script.c Log Message: Merge changes To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcpcd/dist/hooks/30-hostname \ src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.46 -r1.47 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.28 -r1.29 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.49 -r1.50 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.32 -r1.33 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/ipv6.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/ipv6.h \ src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/src/logerr.c cvs rdiff -u -r1.14 -r1.15 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf diff -u src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf:1.6 src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf:1.7 --- src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf:1.6 Mon Dec 28 13:57:40 2020 +++ src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf Fri Apr 21 16:54:26 2023 @@ -11,7 +11,7 @@ nocarrier_roaming_dir="$state_dir/roamin NL=" " : ${resolvconf:=resolvconf} -if type "$resolvconf" >/dev/null 2>&1; then +if command -v "$resolvconf" >/dev/null 2>&1; then have_resolvconf=true else have_resolvconf=false Index: src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname diff -u src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname:1.2 src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname:1.3 --- src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname:1.2 Sat Sep 22 13:17:46 2018 +++ src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Fri Apr 21 16:54:26 2023 @@ -4,20 +4,20 @@ lookup_hostname() { [ -z "$new_ip_address" ] && return 1 # Silly ISC programs love to send error text to stdout - if type dig >/dev/null 2>&1; then + if command -v dig >/dev/null 2>&1; then h=$(dig +short -x $new_ip_address) if [ $? = 0 ]; then echo "$h" | sed 's/\.$//' return 0 fi - elif type host >/dev/null 2>&1; then + elif command -v host >/dev/null 2>&1; then h=$(host $new_ip_address) if [ $? = 0 ]; then echo "$h" \ | sed 's/.* domain name pointer \(.*\)./\1/' return 0 fi - elif type getent >/dev/null 2>&1; then + elif command -v getent >/dev/null 2>&1; then h=$(getent hosts $new_ip_address) if [ $? = 0 ]; then echo "$h" | sed 's/[^ ]* *\([^ ]*\).*/\1/' Index: src/external/bsd/dhcpcd/dist/hooks/30-hostname diff -u src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.5 src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.6 --- src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.5 Fri Oct 22 13:23:20 2021 +++ src/external/bsd/dhcpcd/dist/hooks/30-hostname Fri Apr 21 16:54:26 2023 @@ -25,7 +25,7 @@ _hostname() if [ -z "${1+x}" ]; then if [ -r /proc/sys/kernel/hostname ]; then read name /dev/null 2>/dev/null; then + elif command -v hostname >/dev/null 2>/dev/null; then hostname elif sysctl kern.hostname >/dev/null 2>&1; then sysctl -n kern.hostname @@ -39,7 +39,7 @@ _hostname() if [ -w /proc/sys/kernel/hostname ]; then echo "$1" >/proc/sys/kernel/hostname - elif [ -n "$1" ] && type hostname >/dev/null 2>&1; then + elif [ -n "$1" ] && command -v hostname >/dev/null 2>&1; then hostname "$1" elif sysctl kern.hostname >/dev/null 2>&1; then sysctl -w "kern.hostname=$1" >/dev/null Index: src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf diff -u src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf:1.5 src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf:1.6 --- src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf:1.5 Fri Nov 20 13:24:58 2020 +++ src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf Fri Apr 21 16:54:26 2023 @@ -43,7 +43,7 @@ fi # Debian has a separate file for DHCP config to avoid stamping on # t
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Apr 21 16:54:26 UTC 2023 Modified Files: src/external/bsd/dhcpcd/dist/hooks: 20-resolv.conf 29-lookup-hostname 30-hostname 50-ntp.conf src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6.c ipv6.h ipv6nd.c logerr.c privsep.c script.c Log Message: Merge changes To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcpcd/dist/hooks/30-hostname \ src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.46 -r1.47 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.28 -r1.29 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.49 -r1.50 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.32 -r1.33 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/ipv6.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/ipv6.h \ src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/src/logerr.c cvs rdiff -u -r1.14 -r1.15 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Apr 21 16:52:47 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv11417 Log Message: Update to dhcpcd-10.0.1 with the following changes: * privsep: keep resources open rather than open/close * dhcp6: OPTION_NTP_SERVER is now preferred over OPTION_SNTP_SERVER * Misc bug fixes mainly around privsep for many platforms. * Fix for reading the some BSD routing table entries. * Fix reading authtokens from config. Big new release, mainly around better privsep process management which allows us to detect when they exit unexpectedly. Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_1 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c C src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h C src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test C src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/hooks/30-hostname C src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone C src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 16 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Apr 21 16:52:47 UTC 2023 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv11417 Log Message: Update to dhcpcd-10.0.1 with the following changes: * privsep: keep resources open rather than open/close * dhcp6: OPTION_NTP_SERVER is now preferred over OPTION_SNTP_SERVER * Misc bug fixes mainly around privsep for many platforms. * Fix for reading the some BSD routing table entries. * Fix reading authtokens from config. Big new release, mainly around better privsep process management which allows us to detect when they exit unexpectedly. Status: Vendor Tag: ROY Release Tags: dhcpcd-10_0_1 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c C src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h C src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 U src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test C src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/hooks/30-hostname C src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone C src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ypbind 16 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
Re: CVS commit: src/sys
On 15/11/2022 05:35, Ryo Shimizu wrote: Since l2_sha continues to point outside of m_data manipulated by m_adj(), it can be corrupted by subsequent m_pullup() or other mbuf m_*() operations. I still believe that using MTAG is appropriate. How about something like this? (not tested) Wow, that looks good and works well. I've comitted it, thanks. Since l2_shalen is fixed to ETHER_ADDR_LEN for now, the tag name should be PACKET_TAG_ETHERNET_SRC instead of PACKET_TAG_L2SHA for now. If all L2 addresses are to be treated extensively, the structure of mtag should include the size, but that will not be necessary just yet. I'm happy with that. Roy
CVS commit: src/sys
Module Name:src Committed By: roy Date: Tue Nov 15 10:47:39 UTC 2022 Modified Files: src/sys/net: if_ethersubr.c src/sys/netinet: if_arp.c src/sys/sys: mbuf.h Log Message: arp: Validate ARP source hardware address matches Ethernet source RFC 5227 section 1.1 states that for a DaD ARP probe the sender hardware address must match the hardware address of the interface sending the packet. We can now verify this by checking the mbuf tag PACKET_TAG_ETHERNET_SRC. This fixes an obsure issue where an old router was sending out bogus ARP probes. Thanks to Ryo Shimizu for the re-implementation. To generate a diff of this commit: cvs rdiff -u -r1.322 -r1.323 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.310 -r1.311 src/sys/netinet/if_arp.c cvs rdiff -u -r1.235 -r1.236 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.322 src/sys/net/if_ethersubr.c:1.323 --- src/sys/net/if_ethersubr.c:1.322 Tue Nov 15 09:14:28 2022 +++ src/sys/net/if_ethersubr.c Tue Nov 15 10:47:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.322 2022/11/15 09:14:28 roy Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.323 2022/11/15 10:47:39 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.322 2022/11/15 09:14:28 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.323 2022/11/15 10:47:39 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -886,6 +886,19 @@ ether_input(struct ifnet *ifp, struct mb #endif } + /* For ARP packets, store the source address so that + * ARP DAD probes can be validated. */ + if (etype == ETHERTYPE_ARP) { + struct m_tag *mtag; + + mtag = m_tag_get(PACKET_TAG_ETHERNET_SRC, ETHER_ADDR_LEN, + M_NOWAIT); + if (mtag != NULL) { + memcpy(mtag + 1, >ether_shost, ETHER_ADDR_LEN); + m_tag_prepend(m, mtag); + } + } + /* Strip off the Ethernet header. */ m_adj(m, ehlen); Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.310 src/sys/netinet/if_arp.c:1.311 --- src/sys/netinet/if_arp.c:1.310 Tue Nov 15 09:15:43 2022 +++ src/sys/netinet/if_arp.c Tue Nov 15 10:47:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.310 2022/11/15 09:15:43 roy Exp $ */ +/* $NetBSD: if_arp.c,v 1.311 2022/11/15 10:47:39 roy Exp $ */ /* * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.310 2022/11/15 09:15:43 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.311 2022/11/15 10:47:39 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -932,6 +932,8 @@ again: /* * DAD check, RFC 5227. + * ARP sender hardware address must match the interface + * address of the interface sending the packet. * Collision on sender address is always a duplicate. * Collision on target address is only a duplicate * IF the sender address is the null host (ie a DAD probe) @@ -945,13 +947,19 @@ again: m->m_flags & M_BCAST && ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED { - struct sockaddr_dl sdl, *sdlp; + struct m_tag *mtag; - sdlp = sockaddr_dl_init(, sizeof(sdl), - ifp->if_index, ifp->if_type, - NULL, 0, ar_sha(ah), ah->ar_hln); - arp_dad_duplicated((struct ifaddr *)ia, sdlp); - goto out; + mtag = m_tag_find(m, PACKET_TAG_ETHERNET_SRC); + if (mtag == NULL || (ah->ar_hln == ETHER_ADDR_LEN && + memcmp(mtag + 1, ar_sha(ah), ah->ar_hln) == 0)) { + struct sockaddr_dl sdl, *sdlp; + + sdlp = sockaddr_dl_init(, sizeof(sdl), + ifp->if_index, ifp->if_type, + NULL, 0, ar_sha(ah), ah->ar_hln); + arp_dad_duplicated((struct ifaddr *)ia, sdlp); + goto out; + } } /* Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.235 src/sys/sys/mbuf.h:1.236 --- src/sys/sys/mbuf.h:1.235 Tue Nov 15 09:13:43 2022 +++ src/sys/sys/mbuf.h Tue Nov 15 10:47:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.235 2022/11/15 09:13:43 roy Exp $ */ +/* $NetBSD: mbuf.h,v 1.236 2022/11/15 10:47:39 roy Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -800,6 +800,7 @@ int m_tag_copy_chain(struct mbuf *, stru */ #define PACKET_TAG_MPLS 29 /* Indicate it's for MPLS */ #define PACKET_TAG_SRCROUTE 30 /* IPv4 source routing */ +#define PACKET_TAG_ETHERNET_SRC 31 /* Ethernet source address */ /* * Return the number of bytes in the mbuf chain, m.
CVS commit: src/sys
Module Name:src Committed By: roy Date: Tue Nov 15 10:47:39 UTC 2022 Modified Files: src/sys/net: if_ethersubr.c src/sys/netinet: if_arp.c src/sys/sys: mbuf.h Log Message: arp: Validate ARP source hardware address matches Ethernet source RFC 5227 section 1.1 states that for a DaD ARP probe the sender hardware address must match the hardware address of the interface sending the packet. We can now verify this by checking the mbuf tag PACKET_TAG_ETHERNET_SRC. This fixes an obsure issue where an old router was sending out bogus ARP probes. Thanks to Ryo Shimizu for the re-implementation. To generate a diff of this commit: cvs rdiff -u -r1.322 -r1.323 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.310 -r1.311 src/sys/netinet/if_arp.c cvs rdiff -u -r1.235 -r1.236 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Tue Nov 15 09:15:44 UTC 2022 Modified Files: src/sys/netinet: if_arp.c Log Message: Revert prior. To generate a diff of this commit: cvs rdiff -u -r1.309 -r1.310 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.309 src/sys/netinet/if_arp.c:1.310 --- src/sys/netinet/if_arp.c:1.309 Mon Nov 14 09:32:21 2022 +++ src/sys/netinet/if_arp.c Tue Nov 15 09:15:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.309 2022/11/14 09:32:21 roy Exp $ */ +/* $NetBSD: if_arp.c,v 1.310 2022/11/15 09:15:43 roy Exp $ */ /* * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.309 2022/11/14 09:32:21 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.310 2022/11/15 09:15:43 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -932,8 +932,6 @@ again: /* * DAD check, RFC 5227. - * ARP sender hardware address must match the interface - * address of the interface sending the packet. * Collision on sender address is always a duplicate. * Collision on target address is only a duplicate * IF the sender address is the null host (ie a DAD probe) @@ -945,10 +943,7 @@ again: (in_hosteq(isaddr, myaddr) || (in_nullhost(isaddr) && in_hosteq(itaddr, myaddr) && m->m_flags & M_BCAST && - ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED))) && - m->m_pkthdr.l2_shalen == ah->ar_hln && ( - ah->ar_hln == 0 || - memcmp(m->m_pkthdr.l2_sha, ar_sha(ah), ah->ar_hln) == 0)) + ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED { struct sockaddr_dl sdl, *sdlp;
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Tue Nov 15 09:15:44 UTC 2022 Modified Files: src/sys/netinet: if_arp.c Log Message: Revert prior. To generate a diff of this commit: cvs rdiff -u -r1.309 -r1.310 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Tue Nov 15 09:14:28 UTC 2022 Modified Files: src/sys/net: if_ethersubr.c Log Message: Revert prior. To generate a diff of this commit: cvs rdiff -u -r1.321 -r1.322 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.321 src/sys/net/if_ethersubr.c:1.322 --- src/sys/net/if_ethersubr.c:1.321 Mon Nov 14 09:23:42 2022 +++ src/sys/net/if_ethersubr.c Tue Nov 15 09:14:28 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.321 2022/11/14 09:23:42 roy Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.322 2022/11/15 09:14:28 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.321 2022/11/14 09:23:42 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.322 2022/11/15 09:14:28 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -886,10 +886,6 @@ ether_input(struct ifnet *ifp, struct mb #endif } - /* Store the senders hardware address */ - m->m_pkthdr.l2_sha = >ether_shost; - m->m_pkthdr.l2_shalen = ETHER_ADDR_LEN; - /* Strip off the Ethernet header. */ m_adj(m, ehlen);
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Tue Nov 15 09:14:28 UTC 2022 Modified Files: src/sys/net: if_ethersubr.c Log Message: Revert prior. To generate a diff of this commit: cvs rdiff -u -r1.321 -r1.322 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: roy Date: Tue Nov 15 09:13:43 UTC 2022 Modified Files: src/sys/sys: mbuf.h Log Message: Revert prior. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.234 src/sys/sys/mbuf.h:1.235 --- src/sys/sys/mbuf.h:1.234 Mon Nov 14 10:15:08 2022 +++ src/sys/sys/mbuf.h Tue Nov 15 09:13:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.234 2022/11/14 10:15:08 roy Exp $ */ +/* $NetBSD: mbuf.h,v 1.235 2022/11/15 09:13:43 roy Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -178,8 +178,8 @@ struct m_hdr { * checksum) -- this is so we can accumulate the checksum for fragmented * packets during reassembly. * - * Size ILP32: 48 - * LP64: 72 + * Size ILP32: 40 + * LP64: 56 */ struct pkthdr { union { @@ -203,9 +203,6 @@ struct pkthdr { int pattr_af; /* ALTQ: address family */ void *pattr_class; /* ALTQ: sched class set by classifier */ void *pattr_hdr; /* ALTQ: saved header position in mbuf */ - - void *l2_sha; /* l2 sender host address */ - size_t l2_shalen; /* length of the sender address */ }; /* Checksumming flags (csum_flags). */
CVS commit: src/sys/sys
Module Name:src Committed By: roy Date: Tue Nov 15 09:13:43 UTC 2022 Modified Files: src/sys/sys: mbuf.h Log Message: Revert prior. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys
On 14/11/2022 11:04, Martin Husemann wrote: This clearly is a layering/abstraction violation and would have been good to discuss upfront. Where do you make use of that information? What about other packet injection paths? The next commit uses it in if_arp to ensure that the DaD probe sending interface hardware address matches the sending hardware address in the ARP packet as specified in RFC 5227 section 1.1 I couldn't think of a better way of achieving this. Roy
Re: CVS commit: src/sys
On 14/11/2022 09:49, Kengo NAKAHARA wrote: Hi, Please update the size in comment, when struct pkthdr is changed. Â Â Â https://github.com/NetBSD/src/blob/trunk/sys/sys/mbuf.h#L181 Thanks, Done, thanks. Roy
CVS commit: src/sys/sys
Module Name:src Committed By: roy Date: Mon Nov 14 10:15:08 UTC 2022 Modified Files: src/sys/sys: mbuf.h Log Message: Adjust comment for new sizes. Thanks to Kengo NAKAHARA To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: roy Date: Mon Nov 14 10:15:08 UTC 2022 Modified Files: src/sys/sys: mbuf.h Log Message: Adjust comment for new sizes. Thanks to Kengo NAKAHARA To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.233 src/sys/sys/mbuf.h:1.234 --- src/sys/sys/mbuf.h:1.233 Mon Nov 14 09:23:42 2022 +++ src/sys/sys/mbuf.h Mon Nov 14 10:15:08 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.233 2022/11/14 09:23:42 roy Exp $ */ +/* $NetBSD: mbuf.h,v 1.234 2022/11/14 10:15:08 roy Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -178,8 +178,8 @@ struct m_hdr { * checksum) -- this is so we can accumulate the checksum for fragmented * packets during reassembly. * - * Size ILP32: 40 - * LP64: 56 + * Size ILP32: 48 + * LP64: 72 */ struct pkthdr { union {
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Mon Nov 14 09:32:21 UTC 2022 Modified Files: src/sys/netinet: if_arp.c Log Message: arp: Validate L2 sender hardware address matches ARP probe RFC 5227 section 1.1 states that for a DaD ARP probe the sender hardware address must match the hardware address of the interface sending the packet. We can now verify this by checking the mbuf packet header. This fixes an obsure issue where an old router was sending out bogus ARP probes. To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.308 src/sys/netinet/if_arp.c:1.309 --- src/sys/netinet/if_arp.c:1.308 Sat Sep 3 01:35:03 2022 +++ src/sys/netinet/if_arp.c Mon Nov 14 09:32:21 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.308 2022/09/03 01:35:03 thorpej Exp $ */ +/* $NetBSD: if_arp.c,v 1.309 2022/11/14 09:32:21 roy Exp $ */ /* * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.308 2022/09/03 01:35:03 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.309 2022/11/14 09:32:21 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -932,6 +932,8 @@ again: /* * DAD check, RFC 5227. + * ARP sender hardware address must match the interface + * address of the interface sending the packet. * Collision on sender address is always a duplicate. * Collision on target address is only a duplicate * IF the sender address is the null host (ie a DAD probe) @@ -943,7 +945,10 @@ again: (in_hosteq(isaddr, myaddr) || (in_nullhost(isaddr) && in_hosteq(itaddr, myaddr) && m->m_flags & M_BCAST && - ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED + ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED))) && + m->m_pkthdr.l2_shalen == ah->ar_hln && ( + ah->ar_hln == 0 || + memcmp(m->m_pkthdr.l2_sha, ar_sha(ah), ah->ar_hln) == 0)) { struct sockaddr_dl sdl, *sdlp;
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Mon Nov 14 09:32:21 UTC 2022 Modified Files: src/sys/netinet: if_arp.c Log Message: arp: Validate L2 sender hardware address matches ARP probe RFC 5227 section 1.1 states that for a DaD ARP probe the sender hardware address must match the hardware address of the interface sending the packet. We can now verify this by checking the mbuf packet header. This fixes an obsure issue where an old router was sending out bogus ARP probes. To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: roy Date: Mon Nov 14 09:23:42 UTC 2022 Modified Files: src/sys/net: if_ethersubr.c src/sys/sys: mbuf.h Log Message: net: Store a pointer to the Layer 2 Sender Hardware address in mbuf The BSD networking stack is designed around passing a mbuf down the chain and each layer removes the part it's interested in before passing it to the next. This makes it easy for each layer to do it's work, but non trivial to work backwards. As such we now store a pointer to the Senders Hardware address in the mbuf packet header so that protocols can perform any required validation. To generate a diff of this commit: cvs rdiff -u -r1.320 -r1.321 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.232 -r1.233 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: roy Date: Mon Nov 14 09:23:42 UTC 2022 Modified Files: src/sys/net: if_ethersubr.c src/sys/sys: mbuf.h Log Message: net: Store a pointer to the Layer 2 Sender Hardware address in mbuf The BSD networking stack is designed around passing a mbuf down the chain and each layer removes the part it's interested in before passing it to the next. This makes it easy for each layer to do it's work, but non trivial to work backwards. As such we now store a pointer to the Senders Hardware address in the mbuf packet header so that protocols can perform any required validation. To generate a diff of this commit: cvs rdiff -u -r1.320 -r1.321 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.232 -r1.233 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.320 src/sys/net/if_ethersubr.c:1.321 --- src/sys/net/if_ethersubr.c:1.320 Sat Sep 3 02:47:59 2022 +++ src/sys/net/if_ethersubr.c Mon Nov 14 09:23:42 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.320 2022/09/03 02:47:59 thorpej Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.321 2022/11/14 09:23:42 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.320 2022/09/03 02:47:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.321 2022/11/14 09:23:42 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -886,6 +886,10 @@ ether_input(struct ifnet *ifp, struct mb #endif } + /* Store the senders hardware address */ + m->m_pkthdr.l2_sha = >ether_shost; + m->m_pkthdr.l2_shalen = ETHER_ADDR_LEN; + /* Strip off the Ethernet header. */ m_adj(m, ehlen); Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.232 src/sys/sys/mbuf.h:1.233 --- src/sys/sys/mbuf.h:1.232 Fri Feb 19 14:51:59 2021 +++ src/sys/sys/mbuf.h Mon Nov 14 09:23:42 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.232 2021/02/19 14:51:59 christos Exp $ */ +/* $NetBSD: mbuf.h,v 1.233 2022/11/14 09:23:42 roy Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -203,6 +203,9 @@ struct pkthdr { int pattr_af; /* ALTQ: address family */ void *pattr_class; /* ALTQ: sched class set by classifier */ void *pattr_hdr; /* ALTQ: saved header position in mbuf */ + + void *l2_sha; /* l2 sender host address */ + size_t l2_shalen; /* length of the sender address */ }; /* Checksumming flags (csum_flags). */
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: roy Date: Wed Dec 22 00:21:32 UTC 2021 Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: Handle the SIOCGNBRINFO ioctl for compat32. arp -a works with compat32 now. Credit to simonb@ for the ndp fix from which this is cribbed. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.78 -r1.79 src/sys/compat/netbsd32/netbsd32_ioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.119 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.120 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.119 Wed Apr 14 16:26:23 2021 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Wed Dec 22 00:21:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.119 2021/04/14 16:26:23 mlelstv Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.120 2021/12/22 00:21:32 roy Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.119 2021/04/14 16:26:23 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.120 2021/12/22 00:21:32 roy Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -180,6 +180,18 @@ netbsd32_to_ifmediareq(struct netbsd32_i } static inline void +netbsd32_to_in_nbrinfo(struct netbsd32_in_nbrinfo *s32p, struct in_nbrinfo *p, +u_long cmd) +{ + + memcpy(p->ifname, s32p->ifname, sizeof p->ifname); + memcpy(>addr, >addr, sizeof p->addr); + p->asked = s32p->asked; + p->state = s32p->state; + p->expire = s32p->expire; +} + +static inline void netbsd32_to_in6_nbrinfo(struct netbsd32_in6_nbrinfo *s32p, struct in6_nbrinfo *p, u_long cmd) { @@ -190,7 +202,6 @@ netbsd32_to_in6_nbrinfo(struct netbsd32_ p->isrouter = s32p->isrouter; p->state = s32p->state; p->expire = s32p->expire; - } static inline void @@ -715,6 +726,18 @@ netbsd32_from_ifmediareq(struct ifmediar } static inline void +netbsd32_from_in_nbrinfo(struct in_nbrinfo *p, struct netbsd32_in_nbrinfo *s32p, +u_long cmd) +{ + + memcpy(s32p->ifname, p->ifname, sizeof s32p->ifname); + memcpy(>addr, >addr, sizeof s32p->addr); + s32p->asked = p->asked; + s32p->state = p->state; + s32p->expire = p->expire; +} + +static inline void netbsd32_from_in6_nbrinfo(struct in6_nbrinfo *p, struct netbsd32_in6_nbrinfo *s32p, u_long cmd) { @@ -1525,6 +1548,8 @@ netbsd32_ioctl(struct lwp *l, case SIOCGIFMEDIA32: IOCTL_STRUCT_CONV_TO(SIOCGIFMEDIA, ifmediareq); + case SIOCGNBRINFO32: + IOCTL_STRUCT_CONV_TO(SIOCGNBRINFO, in_nbrinfo); case SIOCGNBRINFO_IN632: IOCTL_STRUCT_CONV_TO(SIOCGNBRINFO_IN6, in6_nbrinfo); Index: src/sys/compat/netbsd32/netbsd32_ioctl.h diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.78 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.79 --- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.78 Wed Apr 14 16:26:23 2021 +++ src/sys/compat/netbsd32/netbsd32_ioctl.h Wed Dec 22 00:21:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.h,v 1.78 2021/04/14 16:26:23 mlelstv Exp $ */ +/* $NetBSD: netbsd32_ioctl.h,v 1.79 2021/12/22 00:21:32 roy Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -480,6 +480,17 @@ struct netbsd32_sioc_vif_req { /* from */ #define SIOCGETVIFCNT32 _IOWR('u', 51, struct netbsd32_sioc_vif_req)/* vif pkt cnt */ +/* from */ +struct netbsd32_in_nbrinfo { + char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */ + struct in_addr addr; /* IPv4 address of the neighbor */ + netbsd32_long asked; /* number of queries already sent for this addr */ + int state; /* reachability state */ + int expire; /* lifetime for NDP state transition */ +}; +/* from */ +#define SIOCGNBRINFO32 _IOWR('i', 249, struct netbsd32_in_nbrinfo) + /* from */ struct netbsd32_in6_nbrinfo { char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: roy Date: Wed Dec 22 00:21:32 UTC 2021 Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: Handle the SIOCGNBRINFO ioctl for compat32. arp -a works with compat32 now. Credit to simonb@ for the ndp fix from which this is cribbed. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.78 -r1.79 src/sys/compat/netbsd32/netbsd32_ioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: roy Date: Tue Dec 21 15:27:19 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: Fix build of xlint/line1 with OBJDIR set. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/usr.bin/xlint/lint1/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/Makefile diff -u src/usr.bin/xlint/lint1/Makefile:1.87 src/usr.bin/xlint/lint1/Makefile:1.88 --- src/usr.bin/xlint/lint1/Makefile:1.87 Sun Sep 5 17:49:55 2021 +++ src/usr.bin/xlint/lint1/Makefile Tue Dec 21 15:27:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.87 2021/09/05 17:49:55 rillig Exp $ +# $NetBSD: Makefile,v 1.88 2021/12/21 15:27:19 roy Exp $ .include @@ -24,7 +24,7 @@ LINTFLAGS.scan.c+= -X 192,214 # due to s LINTFLAGS.scan.c+= -X 307 # static variable unused CPPFLAGS+= -DIS_LINT1 -CPPFLAGS+= -I${.CURDIR} +CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} CPPFLAGS+= ${DEBUG:D-DDEBUG -DYYDEBUG} COPTS.err.c+= ${${ACTIVE_CC} == "clang":? -Wno-format-nonliteral :}
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: roy Date: Tue Dec 21 15:27:19 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: Fix build of xlint/line1 with OBJDIR set. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/usr.bin/xlint/lint1/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Oct 22 13:32:28 UTC 2021 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to dhcpcd-9.4.1 To generate a diff of this commit: cvs rdiff -u -r1.1821 -r1.1822 src/doc/3RDPARTY cvs rdiff -u -r1.2842 -r1.2843 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1821 src/doc/3RDPARTY:1.1822 --- src/doc/3RDPARTY:1.1821 Thu Oct 14 14:53:41 2021 +++ src/doc/3RDPARTY Fri Oct 22 13:32:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1821 2021/10/14 14:53:41 brad Exp $ +# $NetBSD: 3RDPARTY,v 1.1822 2021/10/22 13:32:28 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,17 +352,18 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 9.4.0 -Current Vers: 9.4.0 +Version: 9.4.1 +Current Vers: 9.4.1 Maintainer: roy -Archive Site: ftp://roy.marples.name/pub/dhcpcd/ -Home Page: http://roy.marples.name/projects/dhcpcd/ -Date: 2020-12-28 -Mailing List: dhcpcd-disc...@marples.name +Archive Site: https://roy.marples.name/downloads/dhcpcd/ +Home Page: https://roy.marples.name/projects/dhcpcd/ +Home Page: https://github.com/NetworkConfiguration/dhcpcd +Date: 2021-10-22 License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Notes: -Please submit all changes to the project mailing list. +Please submit all changes upstream. +Import using the import-src make target. Package: drm Version: Linux 3.15 Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2842 src/doc/CHANGES:1.2843 --- src/doc/CHANGES:1.2842 Thu Oct 21 02:47:17 2021 +++ src/doc/CHANGES Fri Oct 22 13:32:28 2021 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2842 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2843 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -444,3 +444,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: sgp40mox(4): Driver for the Sensirion SGP40 MOx gas sensor for air quality [brad 20211014] aarch64: Enable MKRELRO and MKPIE by default. [nia 20211014] + dhcpcd(8): Update to dhcpcd-9.4.1. [roy 20211022]
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Oct 22 13:32:28 UTC 2021 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to dhcpcd-9.4.1 To generate a diff of this commit: cvs rdiff -u -r1.1821 -r1.1822 src/doc/3RDPARTY cvs rdiff -u -r1.2842 -r1.2843 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd
Module Name:src Committed By: roy Date: Fri Oct 22 13:25:58 UTC 2021 Modified Files: src/external/bsd/dhcpcd: Makefile.inc src/external/bsd/dhcpcd/examples/hooks: Makefile src/external/bsd/dhcpcd/libexec/dhcpcd-hooks: Makefile src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks: Makefile src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Remove build for stuff dhcpcd's import-src target now does. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/examples/hooks/Makefile cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile cvs rdiff -u -r1.55 -r1.56 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd
Module Name:src Committed By: roy Date: Fri Oct 22 13:25:58 UTC 2021 Modified Files: src/external/bsd/dhcpcd: Makefile.inc src/external/bsd/dhcpcd/examples/hooks: Makefile src/external/bsd/dhcpcd/libexec/dhcpcd-hooks: Makefile src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks: Makefile src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Remove build for stuff dhcpcd's import-src target now does. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/examples/hooks/Makefile cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile cvs rdiff -u -r1.55 -r1.56 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/Makefile.inc diff -u src/external/bsd/dhcpcd/Makefile.inc:1.4 src/external/bsd/dhcpcd/Makefile.inc:1.5 --- src/external/bsd/dhcpcd/Makefile.inc:1.4 Thu Apr 2 12:56:01 2020 +++ src/external/bsd/dhcpcd/Makefile.inc Fri Oct 22 13:25:57 2021 @@ -1,17 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2020/04/02 12:56:01 roy Exp $ +# $NetBSD: Makefile.inc,v 1.5 2021/10/22 13:25:57 roy Exp $ SRCDIR= ${NETBSDSRCDIR}/external/bsd/dhcpcd DIST= ${SRCDIR}/dist - -SED_SYS= -e 's:@SYSCONFDIR@:/etc:g' \ - -e 's:@DATADIR@:/usr/share/examples:g' \ - -e 's:@DBDIR@:/var/db/dhcpcd:g' \ - -e 's:@LIBDIR@:/lib:g' \ - -e 's:@RUNDIR@:/var/run/dhcpcd:g' \ - -e 's:@HOOKDIR@:/libexec/dhcpcd-hooks:g' \ - -e 's:@SCRIPT@:/libexec/dhcpcd-run-hooks:g' \ - -e 's:@SERVICEEXISTS@::g' \ - -e 's:@SERVICECMD@::g' \ - -e 's:@SERVICESTATUS@::g' \ - -e 's:@STATUSARG@::g' \ - -e 's:@DEFAULT_HOSTNAME@::g' Index: src/external/bsd/dhcpcd/examples/hooks/Makefile diff -u src/external/bsd/dhcpcd/examples/hooks/Makefile:1.3 src/external/bsd/dhcpcd/examples/hooks/Makefile:1.4 --- src/external/bsd/dhcpcd/examples/hooks/Makefile:1.3 Fri Jul 26 13:29:36 2019 +++ src/external/bsd/dhcpcd/examples/hooks/Makefile Fri Oct 22 13:25:57 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2019/07/26 13:29:36 roy Exp $ +# $NetBSD: Makefile,v 1.4 2021/10/22 13:25:57 roy Exp $ # .include @@ -10,17 +10,10 @@ FILES= 10-wpa_supplicant 15-timezone 29-lookup-hostname .if ${MKYP} != "no" -FILESBUILD_50-ypbind= YES FILES+= 50-ypbind -CLEANFILES+= 50-ypbind .endif FILESDIR= /usr/share/examples/dhcpcd/hooks - -.SUFFIXES: .in - -.in: ../../Makefile.inc - ${TOOL_SED} ${SED_SYS} $< > $@ .endif .include Index: src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile diff -u src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile:1.6 src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile:1.7 --- src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile:1.6 Tue Apr 14 03:16:27 2020 +++ src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile Fri Oct 22 13:25:57 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2020/04/14 03:16:27 kre Exp $ +# $NetBSD: Makefile,v 1.7 2021/10/22 13:25:57 roy Exp $ # .include @@ -12,12 +12,4 @@ FILES+= 50-ntp.conf FILESDIR= /libexec/dhcpcd-hooks -FILESBUILD_30-hostname= YES -CLEANFILES= 30-hostname - -.SUFFIXES: .in - -.in: ../../Makefile.inc - ${TOOL_SED} ${SED_SYS} $< > $@ - .include Index: src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile diff -u src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile:1.1 src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile:1.2 --- src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile:1.1 Fri Mar 31 21:02:09 2017 +++ src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile Fri Oct 22 13:25:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2017/03/31 21:02:09 roy Exp $ +# $NetBSD: Makefile,v 1.2 2021/10/22 13:25:58 roy Exp $ # .include @@ -12,11 +12,4 @@ SCRIPTSDIR= /libexec MAN= dhcpcd-run-hooks.8 -CLEANFILES= dhcpcd-run-hooks dhcpcd-run-hooks.8 - -.for f in ${SCRIPTS} ${MAN} -${f}: ../../Makefile.inc ${f}.in - ${TOOL_SED} ${SED_SYS} ${HOOKSRC}/${f}.in > $@ -.endfor - .include Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.55 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.56 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.55 Thu Feb 25 07:55:53 2021 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Fri Oct 22 13:25:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.55 2021/02/25 07:55:53 rin Exp $ +# $NetBSD: Makefile,v 1.56 2021/10/22 13:25:58 roy Exp $ # WARNS?= 6 @@ -75,14 +75,7 @@ FILESDIR_dhcpcd.conf= /etc FILESMODE_dhcpcd.conf= 644 # -rw-r--r-- MAN= dhcpcd.conf.5 dhcpcd.8 -CLEANFILES= dhcpcd.conf.5 dhcpcd.8 COPTS.logerr.c+=${${ACTIVE_CC} == "clang" && ${MACHINE_ARCH} == "powerpc":? -O
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Oct 22 13:23:20 UTC 2021 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6.c ipv6.h ipv6nd.c logerr.c privsep.c script.c Added Files: src/external/bsd/dhcpcd/dist/hooks: 30-hostname Removed Files: src/external/bsd/dhcpcd/dist/hooks: 30-hostname.in 50-ypbind.in dhcpcd-run-hooks.8.in dhcpcd-run-hooks.in src/external/bsd/dhcpcd/dist/src: dhcpcd.8.in dhcpcd.conf.5.in Log Message: Sync update To generate a diff of this commit: cvs rdiff -u -r0 -r1.5 src/external/bsd/dhcpcd/dist/hooks/30-hostname cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/dhcpcd/dist/hooks/30-hostname.in cvs rdiff -u -r1.3 -r0 src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in cvs rdiff -u -r1.1.1.8 -r0 \ src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in cvs rdiff -u -r1.6 -r0 src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.45 -r1.46 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.11 -r0 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in cvs rdiff -u -r1.48 -r1.49 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.1.1.25 -r0 src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in cvs rdiff -u -r1.26 -r1.27 src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.31 -r1.32 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/src/ipv6.c cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/src/ipv6.h \ src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/logerr.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.17 src/external/bsd/dhcpcd/dist/src/bpf.c:1.18 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.17 Mon Oct 5 16:02:15 2020 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Fri Oct 22 13:23:20 2021 @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* * dhcpcd: BPF arp and bootp filtering - * Copyright (c) 2006-2020 Roy Marples + * Copyright (c) 2006-2021 Roy Marples * All rights reserved * Redistribution and use in source and binary forms, with or without Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.45 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.46 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.45 Mon Dec 28 13:57:40 2020 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Fri Oct 22 13:23:20 2021 @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-2-Clause */ /* * dhcpcd - DHCP client daemon - * Copyright (c) 2006-2020 Roy Marples + * Copyright (c) 2006-2021 Roy Marples * All rights reserved * Redistribution and use in source and binary forms, with or without @@ -2031,14 +2031,14 @@ dhcp_finish_dad(struct interface *ifp, s #ifdef IPV4LL /* Stop IPv4LL now we have a working DHCP address */ - ipv4ll_drop(ifp); + if (!IN_LINKLOCAL(ntohl(ia->s_addr))) + ipv4ll_drop(ifp); #endif if (ifp->options->options & DHCPCD_INFORM) dhcp_inform(ifp); } - static bool dhcp_addr_duplicated(struct interface *ifp, struct in_addr *ia) { @@ -2069,7 +2069,7 @@ dhcp_addr_duplicated(struct interface *i if (opts & (DHCPCD_STATIC | DHCPCD_INFORM)) { state->reason = "EXPIRE"; script_runreason(ifp, state->reason); -#define NOT_ONLY_SELF (DHCPCD_MASTER | DHCPCD_IPV6RS | DHCPCD_DHCP6) +#define NOT_ONLY_SELF (DHCPCD_MANAGER | DHCPCD_IPV6RS | DHCPCD_DHCP6) if (!(ctx->options & NOT_ONLY_SELF)) eloop_exit(ifp->ctx->eloop, EXIT_FAILURE); return deleted; @@ -2380,8 +2380,9 @@ dhcp_bind(struct interface *ifp) dhcp_closebpf(ifp); openudp: - /* If not in master mode, open an address specific socket. */ - if (ctx->options & DHCPCD_MASTER || + /* If not in manager mode, open an address specific socket. */ + if (ctx->options & DHCPCD_MANAGER || + ifo->options & DHCPCD_STATIC || (state->old != NULL && state->old->yiaddr == state->new->yiaddr && old_state & STATE_ADDED && !(old_state & STATE_FAKE))) @@ -2399,7 +2400,7 @@ openudp: state->udp_rfd = dhcp_openudp(>addr->addr); if (state->udp_rfd == -1) { logerr(__func__); - /* Address sharing without master mode is not supported. + /* Address sharing without manager mode is not supported. * It's also possible another DHCP client could be running, * which is even worse. * We still need to work, so re-open BPF. */ @@ -25
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Oct 22 13:23:20 UTC 2021 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6.c ipv6.h ipv6nd.c logerr.c privsep.c script.c Added Files: src/external/bsd/dhcpcd/dist/hooks: 30-hostname Removed Files: src/external/bsd/dhcpcd/dist/hooks: 30-hostname.in 50-ypbind.in dhcpcd-run-hooks.8.in dhcpcd-run-hooks.in src/external/bsd/dhcpcd/dist/src: dhcpcd.8.in dhcpcd.conf.5.in Log Message: Sync update To generate a diff of this commit: cvs rdiff -u -r0 -r1.5 src/external/bsd/dhcpcd/dist/hooks/30-hostname cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/dhcpcd/dist/hooks/30-hostname.in cvs rdiff -u -r1.3 -r0 src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in cvs rdiff -u -r1.1.1.8 -r0 \ src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in cvs rdiff -u -r1.6 -r0 src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.45 -r1.46 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.11 -r0 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in cvs rdiff -u -r1.48 -r1.49 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.1.1.25 -r0 src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in cvs rdiff -u -r1.26 -r1.27 src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.31 -r1.32 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/src/ipv6.c cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/src/ipv6.h \ src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/logerr.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Oct 22 13:22:00 UTC 2021 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv8684 Log Message: Update to dhcpcd-9.4.1 with the following changes: * BSD: Find the correct interface for tunnelled routes * OpenBSD: Fix uniqueness of routes for matching priorities * Linux: Support more platforms for seccomp (thanks to Fabrice Fontaine) * eloop: Process all waiting fd's as they come in * control: Unlink sockets when not in privsep * privsep: Renamed Master to Manager * privsep: Renamed Privilged Actioneer to Privileged Proxy * privsep: Fix getting interface VLANID on BSD * privsep: Enforce proper alignment of serialized struct cmsghdr * IPv4LL: Don't remove statically assigned addresses * routes: Fix route comparision for network prefixes with different masks * DHCP6: Only send FQDN for SOLICIT, REQUEST, RENEW, or REBIND messages * DHCP6: Don't spam the log when a RA repeatedly triggers an INFORM * DHCP: Fix infinite INFORM messages Status: Vendor Tag: ROY Release Tags: dhcpcd-9_4_1 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c C src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h C src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h N src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 N src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf N src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks N src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname N src/external/bsd/dhcpcd/dist/hooks/50-ypbind 13 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Oct 22 13:22:00 UTC 2021 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv8684 Log Message: Update to dhcpcd-9.4.1 with the following changes: * BSD: Find the correct interface for tunnelled routes * OpenBSD: Fix uniqueness of routes for matching priorities * Linux: Support more platforms for seccomp (thanks to Fabrice Fontaine) * eloop: Process all waiting fd's as they come in * control: Unlink sockets when not in privsep * privsep: Renamed Master to Manager * privsep: Renamed Privilged Actioneer to Privileged Proxy * privsep: Fix getting interface VLANID on BSD * privsep: Enforce proper alignment of serialized struct cmsghdr * IPv4LL: Don't remove statically assigned addresses * routes: Fix route comparision for network prefixes with different masks * DHCP6: Only send FQDN for SOLICIT, REQUEST, RENEW, or REBIND messages * DHCP6: Don't spam the log when a RA repeatedly triggers an INFORM * DHCP: Fix infinite INFORM messages Status: Vendor Tag: ROY Release Tags: dhcpcd-9_4_1 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c C src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c C src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h C src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h N src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 N src/external/bsd/dhcpcd/dist/src/dhcpcd.8 U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf N src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks N src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8 U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/hooks/30-hostname U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname N src/external/bsd/dhcpcd/dist/hooks/50-ypbind 13 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Tue Oct 19 20:01:09 UTC 2021 Modified Files: src/sys/netinet: in_pcb.c Log Message: netinet: Allow binding the unspecified address when no addresses exist You should always be able to bind to the unspecified address even if no addresses have been configured on any interface. For example, a DHCP client could be started before the loopback interface has been fully configured. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/sys/netinet/in_pcb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Tue Oct 19 20:01:09 UTC 2021 Modified Files: src/sys/netinet: in_pcb.c Log Message: netinet: Allow binding the unspecified address when no addresses exist You should always be able to bind to the unspecified address even if no addresses have been configured on any interface. For example, a DHCP client could be started before the loopback interface has been fully configured. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/sys/netinet/in_pcb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/in_pcb.c diff -u src/sys/netinet/in_pcb.c:1.185 src/sys/netinet/in_pcb.c:1.186 --- src/sys/netinet/in_pcb.c:1.185 Tue Sep 8 14:12:57 2020 +++ src/sys/netinet/in_pcb.c Tue Oct 19 20:01:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.c,v 1.185 2020/09/08 14:12:57 christos Exp $ */ +/* $NetBSD: in_pcb.c,v 1.186 2021/10/19 20:01:09 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.185 2020/09/08 14:12:57 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.186 2021/10/19 20:01:09 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -436,8 +436,6 @@ in_pcbbind(void *v, struct sockaddr_in * if (inp->inp_af != AF_INET) return (EINVAL); - if (IN_ADDRLIST_READER_EMPTY()) - return (EADDRNOTAVAIL); if (inp->inp_lport || !in_nullhost(inp->inp_laddr)) return (EINVAL);
Re: CVS commit: src/sys
Hi Christos On 14/02/2021 20:58, Christos Zoulas wrote: Module Name:src Committed By: christos Date: Sun Feb 14 20:58:35 UTC 2021 Modified Files: src/sys/net: if_arp.h if_bridge.c src/sys/netinet: icmp_private.h if_arp.c igmp_var.h in_l2tp.c ip_flow.c ip_input.c ip_private.h tcp_input.c tcp_private.h udp_private.h udp_usrreq.c src/sys/netinet6: icmp6.c in6_l2tp.c ip6_flow.c ip6_input.c ip6_private.h udp6_usrreq.c src/sys/sys: mbuf.h param.h Log Message: - centralize header align and pullup into a single inline function - use a single macro to align pointers and expose the alignment, instead of hard-coding 3 in 1/2 the macros. - fix an issue in the ipv6 lt2p where it was aligning for ipv4 and pulling for ipv6. -#ifdef __NO_STRICT_ALIGNMENT -#defineIP_HDR_ALIGNED_P(ip)1 -#else -#defineIP_HDR_ALIGNED_P(ip)vaddr_t) (ip)) & 3) == 0) -#endif +#defineIP_HDR_ALIGNMENT3 #endif /* _KERNEL */ While this is a like for like change, I feel that the meaning of IP_HDR_ALIGNMENT is no longer clear as 3 without context makes no sense at all. We know it should be aligned to 4 bytes. I suggest we change POINTER_ALIGNED_P to accept the alignment value we want rather than the bitwise test we supply, like so: #define POINTER_ALIGNED_P(p, a) (((uintptr_t)(p) & ((a) - 1)) == 0) Roy
Re: CVS commit: src/sys/netinet
On 16/02/2021 09:20, Martin Husemann wrote: On Tue, Feb 16, 2021 at 08:26:40AM +, Roy Marples wrote: Is that because ARP_HDR_ALIGNMENT is forcing 4 byte alignment? The KASSERT a few lines below triggerd, we need to be consistent. For the purposes of using just the header we define I'm pretty sure we can use 2 byte alignment and set ARP_HDR_ALIGNMENT to 1. I can test (I have an alignment critical machine with non-ETHER_ALIGN'ing network driver). Send me a patch, I lost track in the ongoing overhaul. ARP_HDR_ALIGNED_P can now be removed from if_arp.c as well. Not sure I understand what you mean here. Index: net/if_arp.h === RCS file: /cvsroot/src/sys/net/if_arp.h,v retrieving revision 1.40 diff -u -p -r1.40 if_arp.h --- net/if_arp.h14 Feb 2021 20:58:34 - 1.40 +++ net/if_arp.h16 Feb 2021 09:26:23 - @@ -72,7 +72,7 @@ structarphdr { uint8_t ar_tpa[]; /* target protocol address */ #endif }; -#defineARP_HDR_ALIGNMENT 3 +#defineARP_HDR_ALIGNMENT 1 static __inline uint8_t * ar_data(struct arphdr *ap) Index: netinet/if_arp.c === RCS file: /cvsroot/src/sys/netinet/if_arp.c,v retrieving revision 1.305 diff -u -p -r1.305 if_arp.c --- netinet/if_arp.c16 Feb 2021 05:44:13 - 1.305 +++ netinet/if_arp.c16 Feb 2021 09:26:23 - @@ -133,12 +133,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1 */ #define ETHERTYPE_IPTRAILERS ETHERTYPE_TRAIL -#ifdef __NO_STRICT_ALIGNMENT -#defineARP_HDR_ALIGNED_P(ar) 1 -#else -#defineARP_HDR_ALIGNED_P(ar) vaddr_t) (ar)) & 1) == 0) -#endif - /* timers */ static int arp_reachable = REACHABLE_TIME; static int arp_retrans = RETRANS_TIMER; In my testing on aarch64 and octeon (both of which I think are strict alignment) neither need pullups nor copyups as the mbuf already has enough and arphrd is aligned correctly already. Roy
Re: CVS commit: src/sys/netinet
On 16/02/2021 05:44, Martin Husemann wrote: Module Name:src Committed By: martin Date: Tue Feb 16 05:44:14 UTC 2021 Modified Files: src/sys/netinet: if_arp.c Log Message: Undo previous backout: alignment is needed here. The reason for the previous backout was a misunderstanding (POINTER_ALIGNED_P was broken, but the assertion fired even after it got fixed). Is that because ARP_HDR_ALIGNMENT is forcing 4 byte alignment? For the purposes of using just the header we define I'm pretty sure we can use 2 byte alignment and set ARP_HDR_ALIGNMENT to 1. ARP_HDR_ALIGNED_P can now be removed from if_arp.c as well. Roy
Re: CVS commit: src/sys
On 13/02/2021 21:34, David Young wrote: On Tue, Feb 09, 2021 at 07:02:32AM +, Roy Marples wrote: Hi David On 03/02/2021 21:45, David Young wrote: This change looks a little hasty to me. It looks to me like some of these structs were __packed so that they could be read/written directly from/to any offset in a packet chain using mtod(), which does not pay any mind to the alignment of `*t`: #define mtod(m, t) ((t)((m)->m_data)) I see gre_h is accessed in that way, just for one example. Looking at the other places where this is handled, does this patch to gre_h address your concerns? I tested this on aarch64 which does not define __NO_STRICT_ALIGNMENT and it passes the KASSERT. It is possible to simplify your patch a lot. The GRE header is only 4 bytes long. On the receive side, just perform the m_pullup like the old code did and then memcpy to a `struct gre_h` on the stack. On the send side, construct the header on the stack and then memcpy it into the mbuf. The same general approach, of copying headers between mbufs the stack, is probably plenty fast for virtually any size of header used in the network stack. Done
Re: CVS commit: src/sys/net
On 13/02/2021 14:19, Jonathan A. Kollasch wrote: On Sat, Feb 13, 2021 at 07:28:05AM +, Roy Marples wrote: Module Name:src Committed By: roy Date: Sat Feb 13 07:28:05 UTC 2021 Modified Files: src/sys/net: if_ether.h if_ethersubr.c Log Message: if_ether: Ensure that ether_header is aligned To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/net/if_ether.h cvs rdiff -u -r1.289 -r1.290 src/sys/net/if_ethersubr.c This appears to ensure the Ethernet header is naturally aligned on a 32-bit boundary. The 16-bit ether_type field is the only thing in ether_header that is wider than a uint8_t. Many drivers will place the start of the receive buffer at an ETHER_ALIGN (which is 2) offset to ensure the layer three header is 32-bit aligned after the 14-byte Ethernet header. Thus this will result in always calling m_copyup() in ether_input() on strict alignment platforms. Reverted
Re: CVS commit: src/sys
Hi David On 03/02/2021 21:45, David Young wrote: > > This change looks a little hasty to me. > > It looks to me like some of these structs were __packed so that > they could be read/written directly from/to any offset in a packet > chain using mtod(), which does not pay any mind to the alignment > of `*t`: > > #define mtod(m, t) ((t)((m)->m_data)) > > I see gre_h is accessed in that way, just for one example. Looking at the other places where this is handled, does this patch to gre_h address your concerns? I tested this on aarch64 which does not define __NO_STRICT_ALIGNMENT and it passes the KASSERT. Roy diff -r e3c82b1d9c2e sys/net/if_gre.c --- a/sys/net/if_gre.c Mon Feb 08 01:00:49 2021 + +++ b/sys/net/if_gre.c Tue Feb 09 06:55:44 2021 + @@ -395,10 +395,26 @@ sc->sc_error_ev.ev_count++; return; } - if (m->m_len < sizeof(*gh) && (m = m_pullup(m, sizeof(*gh))) == NULL) { - GRE_DPRINTF(sc, "m_pullup failed\n"); - sc->sc_pullup_ev.ev_count++; - return; + + /* If the GRE header is not aligned, slurp it up into a new +* mbuf with space for link headers, in the event we forward +* it. Otherwise, if it is aligned, make sure the entire +* base GRE header is in the first mbuf of the chain. +*/ + if (GRE_HDR_ALIGNED_P(mtod(m, void *)) == 0) { + if ((m = m_copyup(m, sizeof(struct gre_h), + (max_linkhdr + 3) & ~3)) == NULL) { + /* XXXJRT new stat, please */ + GRE_DPRINTF(sc, "m_copyup failed\n"); + sc->sc_pullup_ev.ev_count++; + return; + } + } else if (__predict_false(m->m_len < sizeof(struct gre_h))) { + if ((m = m_pullup(m, sizeof(struct gre_h))) == NULL) { + GRE_DPRINTF(sc, "m_pullup failed\n"); + sc->sc_pullup_ev.ev_count++; + return; + } } gh = mtod(m, const struct gre_h *); @@ -940,7 +956,6 @@ #endif M_PREPEND(m, sizeof(*gh), M_DONTWAIT); - if (m == NULL) { IF_DROP(>if_snd); error = ENOBUFS; @@ -948,6 +963,7 @@ } gh = mtod(m, struct gre_h *); + KASSERT(GRE_HDR_ALIGNED_P(gh)); gh->flags = 0; gh->ptype = etype; /* XXX Need to handle IP ToS. Look at how I handle IP TTL. */ diff -r e3c82b1d9c2e sys/net/if_gre.h --- a/sys/net/if_gre.h Mon Feb 08 01:00:49 2021 + +++ b/sys/net/if_gre.h Tue Feb 09 06:55:44 2021 + @@ -131,6 +131,11 @@ Present if (rt_pres == 1) */ }; +#ifdef __NO_STRICT_ALIGNMENT +#defineGRE_HDR_ALIGNED_P(gh) 1 +#else +#defineGRE_HDR_ALIGNED_P(gh) vaddr_t) (gh)) & 3) == 0) +#endif #ifdef __CTASSERT __CTASSERT(sizeof(struct gre_h) == 4); #endif
Re: CVS commit: src/sys
On 04/02/2021 20:18, matthew green wrote: Roy Marples writes: On 03/02/2021 21:45, David Young wrote: On Wed, Feb 03, 2021 at 05:51:40AM +, Roy Marples wrote: Module Name:src Committed By: roy Date: Wed Feb 3 05:51:40 UTC 2021 Modified Files: src/sys/net: if_arp.h if_ether.h if_gre.h src/sys/netinet: if_ether.h igmp.h in.h ip.h ip6.h ip_carp.h ip_icmp.h ip_mroute.h ip_var.h tcp.h tcp_debug.h tcp_var.h udp.h udp_var.h Log Message: Remove __packed from various network structures They are already network aligned and adding the __packed attribute just causes needless compiler warnings about accssing members of packed objects. This change looks a little hasty to me. It looks to me like some of these structs were __packed so that they could be read/written directly from/to any offset in a packet chain using mtod(), which does not pay any mind to the alignment of `*t`: #define mtod(m, t) ((t)((m)->m_data)) I see gre_h is accessed in that way, just for one example. I don't see any reason in principle that every gre_h accessed through mtod() should be 16-bit aligned in its buffer, but that is the alignment the compiler will expect if gre_h is not __packed. If the actual alignment ever differs from compiler's expectation, then there could be a bus error or an unwanted byte rotation/shift. It looks to me like there's a bit of cleanup to do elsewhere before removing __packed from network structures. ssh over a gre tunnel using erlite (mips64) and pinebook (aarch64) as both ends seems to work fine. I also tested an amd64 endpoint. Not that I disagree with your assessment that the code can always be improved. i looked at removing __packed from these when GCC 9 came around and really started complaining about them. however, i was not able to convince myself that all the users were actually safe if __packed was removed. in particular, 'struct ip' has 4-byte objects at offset 14, 18, 22, and 26. code accessing data directly from the network may fail, and eg, mtod() makes it virtually impossible to check for this at compile time. sanitizers could check at run time. Isn't that already solved here? http://anonhg.netbsd.org/src/rev/9f66cecd950e And if I'm not wrong, just ignoring the warning causes alignment failures as it stands? So it's just swapping one bad thing with another? If so, then there is no right answer other than doing similar alignment checks for our mbufs. Roy
Re: CVS commit: src/sys
On 03/02/2021 21:45, David Young wrote: On Wed, Feb 03, 2021 at 05:51:40AM +, Roy Marples wrote: Module Name:src Committed By: roy Date: Wed Feb 3 05:51:40 UTC 2021 Modified Files: src/sys/net: if_arp.h if_ether.h if_gre.h src/sys/netinet: if_ether.h igmp.h in.h ip.h ip6.h ip_carp.h ip_icmp.h ip_mroute.h ip_var.h tcp.h tcp_debug.h tcp_var.h udp.h udp_var.h Log Message: Remove __packed from various network structures They are already network aligned and adding the __packed attribute just causes needless compiler warnings about accssing members of packed objects. This change looks a little hasty to me. It looks to me like some of these structs were __packed so that they could be read/written directly from/to any offset in a packet chain using mtod(), which does not pay any mind to the alignment of `*t`: #define mtod(m, t) ((t)((m)->m_data)) I see gre_h is accessed in that way, just for one example. I don't see any reason in principle that every gre_h accessed through mtod() should be 16-bit aligned in its buffer, but that is the alignment the compiler will expect if gre_h is not __packed. If the actual alignment ever differs from compiler's expectation, then there could be a bus error or an unwanted byte rotation/shift. It looks to me like there's a bit of cleanup to do elsewhere before removing __packed from network structures. ssh over a gre tunnel using erlite (mips64) and pinebook (aarch64) as both ends seems to work fine. I also tested an amd64 endpoint. Not that I disagree with your assessment that the code can always be improved. Roy
Re: CVS commit: src/sys
On 03/02/2021 12:54, Kamil Rytarowski wrote: This is still a valid usage and ABI breakage for userland. You cannot blame a user for using system structures and headers that stop working after an upgrade, at least before at least libc version bump. For the record, I broke ABI here (it was the reverse situation, addition of __packed). https://github.com/NetBSD/src/commit/a833bd5cfdba983ecb5560512a3547f46f35f11e I vote to revert and handling these structures with appropriate functions that are aware of potentially misaligned data operations. If we you or the project resist and insists on ABI breakage, it should be boldly documented. I don't buy this argument as we frequently do this: r1.1 struct aaa { uint16 a; }; r1.2 struct oaaa { uint16 a; }; struct aaa { uint16 a; uint8 b; }; Now if you choose to put your own stuff before and after in another struct, frankly you are really on your own. Here's another example: struct ehteripudp { struct etherhdr; struct iphdr; struct udphdr; }; This still works! However, it's potentially broken as you are making the assumption there are no options after the ip header. Infact this is how all the network headers have been designed. From the start of the structure you can chain header structures together until you either reach options or data. But you *have* to interogate the headers in order to work this out. Roy
Re: CVS commit: src/sys
On 03/02/2021 10:03, Kamil Rytarowski wrote: On 03.02.2021 06:51, Roy Marples wrote: Module Name:src Committed By: roy Date: Wed Feb 3 05:51:40 UTC 2021 Modified Files: src/sys/net: if_arp.h if_ether.h if_gre.h src/sys/netinet: if_ether.h igmp.h in.h ip.h ip6.h ip_carp.h ip_icmp.h ip_mroute.h ip_var.h tcp.h tcp_debug.h tcp_var.h udp.h udp_var.h Log Message: Remove __packed from various network structures They are already network aligned and adding the __packed attribute just causes needless compiler warnings about accssing members of packed objects. This changes the ABI for userland programs. With __packed, these structures, whenever contain at least 2-byte data, can be placed in a different location inside another structure now. #include #include #include #include struct aaa { uint16_t a; uint8_t b; uint8_t c; } __packed; struct aaa2 { uint8_t x; struct aaa y; }; struct bbb { uint16_t a; uint8_t b; uint8_t c; }; struct bbb2 { uint8_t x; struct bbb y; }; Assuming that struct aaa and bbb are from NetBSD headers and aaa2 and bbb2 are your own constructs then you just have yourself to blame. struct bbb2 { uint8_t x; struct bbb y; } __packed; Makes bbb2 the same as aaa2. Before I saw your commit, I wanted to ask to revert the following changes: icmp6: Remove __packed attribute from icmp6 structures https://github.com/NetBSD/src/commit/427831ba4bdf388aecf3a378de8faf3a4d44a462 ip6: Remove __packed attribute from ip6 structures https://github.com/NetBSD/src/commit/e82879afd70b0e801e6ee53bd14c27be3dd1738f The fallout can be subtle and hard to debug. Once, I removed __packed from one innocent networking structure myself, qemu networking stopped working at all. How you use the structure is up to you. For the record, we were the only BSD to ever apply __packed to these structures and thanks to modern compilers emitting these wonderful warnings it proved to be a bad move. Roy
Re: CVS commit: src/sys
On 03/02/2021 08:34, Joerg Sonnenberger wrote: On Wed, Feb 03, 2021 at 05:51:40AM +, Roy Marples wrote: Module Name:src Committed By: roy Date: Wed Feb 3 05:51:40 UTC 2021 Modified Files: src/sys/net: if_arp.h if_ether.h if_gre.h src/sys/netinet: if_ether.h igmp.h in.h ip.h ip6.h ip_carp.h ip_icmp.h ip_mroute.h ip_var.h tcp.h tcp_debug.h tcp_var.h udp.h udp_var.h Log Message: Remove __packed from various network structures They are already network aligned and adding the __packed attribute just causes needless compiler warnings about accssing members of packed objects. Please add a compile-time assert at least for _KERNEL that the size matches the expectation in that case. Done
Re: CVS commit: src/sys/compat/netbsd32
Hi Simon On 17/01/2021 11:26, Simon Burge wrote: On 15/01/2021 07:15, matthew green wrote: Oh, I quite agree. However, in6_nbrinfo predates my involvement with NetBSD and is the same struct on all BSD. While bringing the same functionality to IPv4, I elected to keep the same struct just to have the same API, warts and all. I like consistency. Does anyone else have an in_nbrinfo? I _think_ the "asked" member only seems to get assigned a 0 for ipv4, and with a long being 32-bits on any 32 bit platform making it a long instead of an int doesn't buy anything. No, it's currently unique to NetBSD. Other BSD's just don't have the infrastructure in their network for it either. I'll note that on a 64-bit platform it's 64 bits though so these do gains something. The value is similar to struct if_data counters really, so maybe it should be a uint64_t if you really want to change it. I would then argue that it might be better then to version it proper and move it out of compat32. I'm still keen to make this change (asked as an int instead of a long in in_nbrinfo) and announce a mini flag day for arp for -current users so that it's one less compat32 ioctl we have to maintain. I would just like arp to work without error. My personal preference would be to keep the same API and add compat. I've committed compat32 support for SIOCGNBRINFO_IN6 and in6_nbrinfo. Looks great! Also looks the same as what I did but couldn't get to work. Maybe I missed the netbsd32 on the long. Roy
Re: CVS commit: src/sys/compat/netbsd32
On 15/01/2021 02:43, Simon Burge wrote: I'll test a bit more I can't actually test as my ERLite won't boot anymore. Console light is green, cu says I'm connected but I get nothing out of it. With cat5 cables plugged in the ports they flash green and then stick on amber. I'm guessing this is non recoverable :( If it is recoverable somehow I can put NetBSD back on it as I have a shiny new USG in it's place. Roy