CVS commit: src

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 21:04:31 UTC 2019

Modified Files:
src/distrib/sets/lists/base: mi
src/external/bsd/openresolv/sbin/resolvconf: Makefile

Log Message:
resolvconf: Build the pdnsd subscriber

Not the most ideal, but technically it works.


To generate a diff of this commit:
cvs rdiff -u -r1.1215 -r1.1216 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/openresolv/sbin/resolvconf/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:57:16 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of openresolv-3.9.2


To generate a diff of this commit:
cvs rdiff -u -r1.1646 -r1.1647 src/doc/3RDPARTY
cvs rdiff -u -r1.2579 -r1.2580 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.1646 src/doc/3RDPARTY:1.1647
--- src/doc/3RDPARTY:1.1646	Thu Sep  5 19:34:14 2019
+++ src/doc/3RDPARTY	Sun Sep  8 20:57:16 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1646 2019/09/05 19:34:14 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1647 2019/09/08 20:57:16 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1031,12 +1031,12 @@ Location:	external/bsd/openpam/dist
 Notes:
 
 Package:	openresolv
-Version:	3.9.1
-Current Vers:	3.9.1
+Version:	3.9.2
+Current Vers:	3.9.2
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/openresolv/
 Home Page:	http://roy.marples.name/projects/openresolv/
-Date:		2019-07-17
+Date:		2019-09-08
 Mailing List: 	openresolv-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/openresolv/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2579 src/doc/CHANGES:1.2580
--- src/doc/CHANGES:1.2579	Thu Sep  5 19:34:14 2019
+++ src/doc/CHANGES	Sun Sep  8 20:57:16 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2579 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2580 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -38,3 +38,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	inet: Fix sending RTM_MISS for unresolvable addresses. [roy 20190901]
 	dhcpcd(8): Import dhcpcd-8.0.4 [roy 20190904]
 	bind: Import version 9.14.5. [christos 20190905]
+	resolvconf(8): Import openresolv-3.9.2 [roy 20190908]



CVS commit: src/doc

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:57:16 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of openresolv-3.9.2


To generate a diff of this commit:
cvs rdiff -u -r1.1646 -r1.1647 src/doc/3RDPARTY
cvs rdiff -u -r1.2579 -r1.2580 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

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:55:57 UTC 2019

Modified Files:
src/distrib/sets/lists/base: mi
src/external/bsd/openresolv/sbin/resolvconf: Makefile

Log Message:
resolvconf: Build the pdns_recursor subscriber

As it now does something more useful than libc.


To generate a diff of this commit:
cvs rdiff -u -r1.1214 -r1.1215 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/openresolv/sbin/resolvconf/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1214 src/distrib/sets/lists/base/mi:1.1215
--- src/distrib/sets/lists/base/mi:1.1214	Tue Sep  3 15:34:08 2019
+++ src/distrib/sets/lists/base/mi	Sun Sep  8 20:55:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1214 2019/09/03 15:34:08 riastradh Exp $
+# $NetBSD: mi,v 1.1215 2019/09/08 20:55:57 roy Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -472,6 +472,7 @@
 ./libexec/resolvconf/dnsmasq			base-resolvconf-root
 ./libexec/resolvconf/libc			base-resolvconf-root
 ./libexec/resolvconf/named			base-resolvconf-root
+./libexec/resolvconf/pdns_recursor		base-resolvconf-root
 ./libexec/resolvconf/unbound			base-resolvconf-root
 ./mnt		base-sys-root
 ./rescue	base-sys-root

Index: src/external/bsd/openresolv/sbin/resolvconf/Makefile
diff -u src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.7 src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.8
--- src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.7	Mon Apr 11 10:43:24 2016
+++ src/external/bsd/openresolv/sbin/resolvconf/Makefile	Sun Sep  8 20:55:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2016/04/11 10:43:24 roy Exp $
+# $NetBSD: Makefile,v 1.8 2019/09/08 20:55:57 roy Exp $
 #
 
 .include 
@@ -9,7 +9,7 @@ DIST=		${NETBSDSRCDIR}/external/bsd/open
 SCRIPTS=	resolvconf
 SCRIPTSDIR=	/sbin
 
-FILES=		libc dnsmasq named unbound
+FILES=		libc dnsmasq named pdns_recursor unbound
 FILESDIR=	/libexec/resolvconf
 # We should not have to do this ...
 .for f in ${FILES}



CVS commit: src

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:55:57 UTC 2019

Modified Files:
src/distrib/sets/lists/base: mi
src/external/bsd/openresolv/sbin/resolvconf: Makefile

Log Message:
resolvconf: Build the pdns_recursor subscriber

As it now does something more useful than libc.


To generate a diff of this commit:
cvs rdiff -u -r1.1214 -r1.1215 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/openresolv/sbin/resolvconf/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/openresolv/dist

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:48:50 UTC 2019

Modified Files:
src/external/bsd/openresolv/dist: Makefile dnsmasq.in
resolvconf.conf.5.in resolvconf.in

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openresolv/dist/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/openresolv/dist/dnsmasq.in
cvs rdiff -u -r1.18 -r1.19 \
src/external/bsd/openresolv/dist/resolvconf.conf.5.in
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/openresolv/dist/resolvconf.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/Makefile
diff -u src/external/bsd/openresolv/dist/Makefile:1.2 src/external/bsd/openresolv/dist/Makefile:1.3
--- src/external/bsd/openresolv/dist/Makefile:1.2	Wed Jul 17 18:31:43 2019
+++ src/external/bsd/openresolv/dist/Makefile	Sun Sep  8 20:48:50 2019
@@ -10,6 +10,7 @@ SYSCONFDIR?=	/etc
 LIBEXECDIR?=	/libexec/resolvconf
 VARDIR?=	/var/run/resolvconf
 
+ECHO?=		echo
 INSTALL?=	install
 SED?=		sed
 
@@ -20,7 +21,7 @@ DOCMODE?=	0644
 MANMODE?=	0444
 
 RESOLVCONF=	resolvconf resolvconf.8 resolvconf.conf.5
-SUBSCRIBERS=	libc dnsmasq named pdnsd unbound
+SUBSCRIBERS=	libc dnsmasq named pdnsd pdns_recursor unbound
 TARGET=		${RESOLVCONF} ${SUBSCRIBERS}
 SRCS=		${TARGET:C,$,.in,} # pmake
 SRCS:=		${TARGET:=.in} # gmake
@@ -103,3 +104,15 @@ import: dist
 	rm -rf /tmp/${DISTPREFIX}
 	${INSTALL} -d /tmp/${DISTPREFIX}
 	tar xvJpf ${DISTFILE} -C /tmp
+
+_import-src:
+	rm -rf ${DESTDIR}/*
+	${INSTALL} -d ${DESTDIR}
+	cp LICENSE README.md ${SRCS} resolvconf.conf ${DESTDIR};
+	cp resolvconf.8.in resolvconf.conf.5.in ${DESTDIR};
+	@${ECHO}
+	@${ECHO} "="
+	@${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}"
+
+import-src:
+	${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else  echo /tmp/${DISTPREFIX}; fi`

Index: src/external/bsd/openresolv/dist/dnsmasq.in
diff -u src/external/bsd/openresolv/dist/dnsmasq.in:1.4 src/external/bsd/openresolv/dist/dnsmasq.in:1.5
--- src/external/bsd/openresolv/dist/dnsmasq.in:1.4	Tue Oct  9 02:53:11 2018
+++ src/external/bsd/openresolv/dist/dnsmasq.in	Sun Sep  8 20:48:50 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 2007-2016 Roy Marples
+# Copyright (c) 2007-2019 Roy Marples
 # All rights reserved
 
 # dnsmasq subscriber for resolvconf
@@ -206,4 +206,6 @@ if $dbus; then
 	dbus-send --system --dest=uk.org.thekelleys.dnsmasq \
  		/uk/org/thekelleys/dnsmasq uk.org.thekelleys.$method \
   		$dbusdest
+	dbus-send --system --dest=uk.org.thekelleys.dnsmasq \
+		/uk/org/thekelleys/dnsmasq uk.org.thekelleys.ClearCache
 fi

Index: src/external/bsd/openresolv/dist/resolvconf.conf.5.in
diff -u src/external/bsd/openresolv/dist/resolvconf.conf.5.in:1.18 src/external/bsd/openresolv/dist/resolvconf.conf.5.in:1.19
--- src/external/bsd/openresolv/dist/resolvconf.conf.5.in:1.18	Tue Jan 31 21:25:58 2017
+++ src/external/bsd/openresolv/dist/resolvconf.conf.5.in	Sun Sep  8 20:48:50 2019
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 29, 2016
+.Dd September 8, 2019
 .Dt RESOLVCONF.CONF 5
 .Os
 .Sh NAME
@@ -64,11 +64,15 @@ Defaults to YES.
 .It Sy interface_order
 These interfaces will always be processed first.
 If unset, defaults to the following:-
-.D1 lo lo[0-9]*
+.Bd -compact -literal -offset indent
+lo lo[0-9]*
+.Ed
 .It Sy dynamic_order
 These interfaces will be processed next, unless they have a metric.
 If unset, defaults to the following:-
-.D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
+.Bd -compact -literal -offset indent
+tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
+.Ed
 .It Sy inclusive_interfaces
 Ignore any exclusive marking for these interfaces.
 This is handy when 3rd party integrations force the
@@ -76,7 +80,9 @@ This is handy when 3rd party integration
 option and you want to disable it easily.
 .It Sy local_nameservers
 If unset, defaults to the following:-
-.D1 127.* 0.0.0.0 255.255.255.255 ::1
+.Bd -compact -literal -offset indent
+127.* 0.0.0.0 255.255.255.255 ::1
+.Ed
 .It Sy search_domains
 Prepend search domains to the dynamically generated list.
 .It Sy search_domains_append
@@ -118,16 +124,24 @@ The syntax is this:
 .Va $keyword Ns / Ns Va $match Ns / Ns Va $replacement
 .Pp
 Example, given this resolv.conf:
-.D1 domain foo.org
-.D1 search foo.org dead.beef
-.D1 nameserver 1.2.3.4
-.D1 nameserver 2.3.4.5
+.Bd -compact -literal -offset indent
+domain foo.org
+search foo.org dead.beef
+nameserver 1.2.3.4
+nameserver 2.3.4.5
+.Ed
 and this configuaration:
-.D1 replace="search/foo*/bar.com nameserver/1.2.3.4/5.6.7.8 nameserver/2.3.4.5/"
+.Bd -compact -literal -offset indent
+replace="search/foo*/bar.

CVS import: src/external/bsd/openresolv/dist

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:46:17 UTC 2019

Update of /cvsroot/src/external/bsd/openresolv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv12058

Log Message:
Import openresolv-3.9.2 with the following changes:
  *  dnsmasq: clear cache after updating servers via dbus
  *  pdns_recursor: Fix global forwards (thus now installed by default)
  *  man: layout and misc fixes

Status:

Vendor Tag: roy
Release Tags:   openresolv-3-9-2

U src/external/bsd/openresolv/dist/.gitignore
U src/external/bsd/openresolv/dist/GNUmakefile
U src/external/bsd/openresolv/dist/LICENSE
C src/external/bsd/openresolv/dist/Makefile
U src/external/bsd/openresolv/dist/README.md
U src/external/bsd/openresolv/dist/config-null.mk
U src/external/bsd/openresolv/dist/configure
C src/external/bsd/openresolv/dist/dnsmasq.in
U src/external/bsd/openresolv/dist/libc.in
U src/external/bsd/openresolv/dist/named.in
U src/external/bsd/openresolv/dist/pdns_recursor.in
U src/external/bsd/openresolv/dist/pdnsd.in
U src/external/bsd/openresolv/dist/resolvconf.8.in
U src/external/bsd/openresolv/dist/resolvconf.conf
C src/external/bsd/openresolv/dist/resolvconf.conf.5.in
C src/external/bsd/openresolv/dist/resolvconf.in
U src/external/bsd/openresolv/dist/unbound.in

4 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

2019-09-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  8 20:46:17 UTC 2019

Update of /cvsroot/src/external/bsd/openresolv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv12058

Log Message:
Import openresolv-3.9.2 with the following changes:
  *  dnsmasq: clear cache after updating servers via dbus
  *  pdns_recursor: Fix global forwards (thus now installed by default)
  *  man: layout and misc fixes

Status:

Vendor Tag: roy
Release Tags:   openresolv-3-9-2

U src/external/bsd/openresolv/dist/.gitignore
U src/external/bsd/openresolv/dist/GNUmakefile
U src/external/bsd/openresolv/dist/LICENSE
C src/external/bsd/openresolv/dist/Makefile
U src/external/bsd/openresolv/dist/README.md
U src/external/bsd/openresolv/dist/config-null.mk
U src/external/bsd/openresolv/dist/configure
C src/external/bsd/openresolv/dist/dnsmasq.in
U src/external/bsd/openresolv/dist/libc.in
U src/external/bsd/openresolv/dist/named.in
U src/external/bsd/openresolv/dist/pdns_recursor.in
U src/external/bsd/openresolv/dist/pdnsd.in
U src/external/bsd/openresolv/dist/resolvconf.8.in
U src/external/bsd/openresolv/dist/resolvconf.conf
C src/external/bsd/openresolv/dist/resolvconf.conf.5.in
C src/external/bsd/openresolv/dist/resolvconf.in
U src/external/bsd/openresolv/dist/unbound.in

4 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/doc

2019-09-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep  4 13:30:53 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note dhcpcd import


To generate a diff of this commit:
cvs rdiff -u -r1.1644 -r1.1645 src/doc/3RDPARTY
cvs rdiff -u -r1.2577 -r1.2578 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.1644 src/doc/3RDPARTY:1.1645
--- src/doc/3RDPARTY:1.1644	Wed Aug 21 17:14:26 2019
+++ src/doc/3RDPARTY	Wed Sep  4 13:30:52 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1644 2019/08/21 17:14:26 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1645 2019/09/04 13:30:52 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -341,12 +341,12 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	8.0.3
-Current Vers:	8.0.3
+Version:	8.0.4
+Current Vers:	8.0.4
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/
-Date:		2019-08-21
+Date:		2019-09-04
 Mailing List: 	dhcpcd-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2577 src/doc/CHANGES:1.2578
--- src/doc/CHANGES:1.2577	Sun Sep  1 22:10:13 2019
+++ src/doc/CHANGES	Wed Sep  4 13:30:52 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2577 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2578 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -36,3 +36,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		ND6_LLINFO_WAITDELETE so that any send at this point can
 		return EHOSTDOWN to match inet behaviour. [roy 20190901]
 	inet: Fix sending RTM_MISS for unresolvable addresses. [roy 20190901]
+	dhcpcd(8): Import dhcpcd-8.0.4 [roy 20190904]



CVS commit: src/doc

2019-09-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep  4 13:30:53 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note dhcpcd import


To generate a diff of this commit:
cvs rdiff -u -r1.1644 -r1.1645 src/doc/3RDPARTY
cvs rdiff -u -r1.2577 -r1.2578 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

2019-09-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep  4 13:28:57 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.8.in dhcpcd.c
if-bsd.c ipv6.c ipv6.h ipv6nd.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/dhcp6.c \
src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/ipv6.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/dist/src/ipv6.h
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/ipv6nd.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

2019-09-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep  4 13:28:57 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.8.in dhcpcd.c
if-bsd.c ipv6.c ipv6.h ipv6nd.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/dhcp6.c \
src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/ipv6.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/dist/src/ipv6.h
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/ipv6nd.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.24 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.25
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.24	Wed Aug 21 17:12:19 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Wed Sep  4 13:28:56 2019
@@ -1176,11 +1176,8 @@ read_lease(struct interface *ifp, struct
 	bytes = dhcp_read_lease_fd(fd, (void **));
 	if (fd_opened)
 		close(fd);
-	if (bytes == 0) {
-		free(lease);
-		logerr("%s: dhcp_read_lease_fd", __func__);
+	if (bytes == 0)
 		return 0;
-	}
 
 	/* Ensure the packet is at lease BOOTP sized
 	 * with a vendor area of 4 octets
@@ -1584,7 +1581,7 @@ eexit:
 }
 
 static uint16_t
-in_cksum(void *data, size_t len, uint32_t *isum)
+in_cksum(const void *data, size_t len, uint32_t *isum)
 {
 	const uint16_t *word = data;
 	uint32_t sum = isum != NULL ? *isum : 0;
@@ -1593,7 +1590,7 @@ in_cksum(void *data, size_t len, uint32_
 		sum += *word++;
 
 	if (len == 1)
-		sum += *(const uint8_t *)word;
+		sum += htons((uint16_t)(*(const uint8_t *)word << 8));
 
 	if (isum != NULL)
 		*isum = sum;
@@ -2237,7 +2234,7 @@ dhcp_bind(struct interface *ifp)
 	ipv4_applyaddr(ifp);
 
 #ifdef IP_PKTINFO
-	/* Close the BPF filter as we can now receive the DHCP renew messages
+	/* Close the BPF filter as we can now receive DHCP messages
 	 * on a UDP socket. */
 	if (state->udp_fd == -1 ||
 	(state->old != NULL && state->old->yiaddr != state->new->yiaddr))
@@ -2246,9 +2243,15 @@ dhcp_bind(struct interface *ifp)
 		/* If not in master mode, open an address specific socket. */
 		if (ctx->udp_fd == -1) {
 			state->udp_fd = dhcp_openudp(ifp);
-			if (state->udp_fd == -1)
+			if (state->udp_fd == -1) {
 logerr(__func__);
-			else
+/* Address sharing without master 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. */
+dhcp_openbpf(ifp);
+			} else
 eloop_event_add(ctx->eloop,
 state->udp_fd, dhcp_handleifudp, ifp);
 		}
@@ -3293,7 +3296,8 @@ valid_udp_packet(void *packet, size_t pl
 	pseudo_ip.ip_len = udp->uh_ulen;
 	csum = 0;
 	in_cksum(_ip, sizeof(pseudo_ip), );
-	if (in_cksum(udp, ntohs(udp->uh_ulen), ) != uh_sum) {
+	csum = in_cksum(udp, ntohs(udp->uh_ulen), );
+	if (csum != uh_sum) {
 		errno = EINVAL;
 		return -1;
 	}
@@ -3662,6 +3666,7 @@ static void
 dhcp_start1(void *arg)
 {
 	struct interface *ifp = arg;
+	struct dhcpcd_ctx *ctx = ifp->ctx;
 	struct if_options *ifo = ifp->options;
 	struct dhcp_state *state;
 	struct stat st;
@@ -3672,17 +3677,19 @@ dhcp_start1(void *arg)
 		return;
 
 	/* Listen on *.*.*.*:bootpc so that the kernel never sends an
-	 * ICMP port unreachable message back to the DHCP server */
-	if (ifp->ctx->udp_fd == -1) {
-		ifp->ctx->udp_fd = dhcp_openudp(NULL);
-		if (ifp->ctx->udp_fd == -1) {
+	 * ICMP port unreachable message back to the DHCP server.
+	 * Only do this in master mode so we don't swallow messages
+	 * for dhcpcd running on another interface. */
+	if (ctx->udp_fd == -1 && ctx->options & DHCPCD_MASTER) {
+		ctx->udp_fd = dhcp_openudp(NULL);
+		if (ctx->udp_fd == -1) {
 			/* Don't log an error if some other process
 			 * is handling this. */
 			if (errno != EADDRINUSE)
 logerr("%s: dhcp_openudp", __func__);
 		} else
-			eloop_event_add(ifp->ctx->eloop,
-			ifp->ctx->udp_fd, dhcp_handleudp, ifp->ctx);
+			eloop_event_add(ctx->eloop,
+			ctx->udp_fd, dhcp_handleudp, ctx);
 	}
 
 	if (dhcp_init(ifp) == -1) {
Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.24 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.25
--- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.24	Wed Aug 21 17:12:19 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c	Wed Sep  4 13:28:56 2019
@@ -950,12 +950,7 @@ dhcpcd_prestartinterface(void *arg)
 
 	if ((!(ifp->ctx->o

CVS import: src/external/bsd/dhcpcd/dist

2019-09-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep  4 13:27:51 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16687

Log Message:
Import dhcpcd-8.0.4 with the following changes:

 * BSD: Fixed router reachability tests
 * inet6: If router unreachable, just solicit a new one
 * inet6: Fon't install a default route if only lladdresses
 * inet6: Stop listening to NA messages
 * BSD: Listen to RTM_MISS messages
 * DHCP: Fix in_cksum for Big Endian
 * DHCP{,6}: Don't log an error if the lease file is truncated


Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-4

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src/external/bsd/dhcpcd/dist/src/if-linux.c
U src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd

CVS import: src/external/bsd/dhcpcd/dist

2019-09-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep  4 13:27:51 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16687

Log Message:
Import dhcpcd-8.0.4 with the following changes:

 * BSD: Fixed router reachability tests
 * inet6: If router unreachable, just solicit a new one
 * inet6: Fon't install a default route if only lladdresses
 * inet6: Stop listening to NA messages
 * BSD: Listen to RTM_MISS messages
 * DHCP: Fix in_cksum for Big Endian
 * DHCP{,6}: Don't log an error if the lease file is truncated


Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-4

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src/external/bsd/dhcpcd/dist/src/if-linux.c
U src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd

CVS commit: src/tests/net

2019-09-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep  3 19:07:50 UTC 2019

Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/ndp: t_ndp.sh

Log Message:
tests: fix ARP and NDP tests for RTM_* messages

While here add tests for RTM_MISS.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.35 -r1.36 src/tests/net/ndp/t_ndp.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/net/arp/t_arp.sh
diff -u src/tests/net/arp/t_arp.sh:1.38 src/tests/net/arp/t_arp.sh:1.39
--- src/tests/net/arp/t_arp.sh:1.38	Mon Aug 19 03:22:05 2019
+++ src/tests/net/arp/t_arp.sh	Tue Sep  3 19:07:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_arp.sh,v 1.38 2019/08/19 03:22:05 ozaki-r Exp $
+#	$NetBSD: t_arp.sh,v 1.39 2019/09/03 19:07:50 roy Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,6 +33,8 @@ IP4NET=10.0.1.0
 IP4DST=10.0.1.2
 IP4DST_PROXYARP1=10.0.1.3
 IP4DST_PROXYARP2=10.0.1.4
+IP4DST_FAIL1=10.0.1.99
+IP4DST_FAIL2=10.0.99.99
 
 DEBUG=${DEBUG:-false}
 TIMEOUT=1
@@ -718,7 +720,38 @@ arp_rtm_body()
 
 	hdr="RTM_ADD.+"
 	what=""
-	addr="$IP4DST link#2"
+	addr="$IP4DST $macaddr_dst"
+	atf_check -s exit:0 -o match:"$hdr" -o match:"$what" -o match:"$addr" \
+		cat $file
+
+	# Test ping and a resulting routing message (RTM_MISS) on subnet
+	rump.route -n monitor -c 1 > $file &
+	pid=$!
+	sleep 1
+	# arp_maxtries = 5, second between each try
+	atf_check -s exit:2 -o ignore -e ignore \
+		rump.ping -n -w 6 -c 6 $IP4DST_FAIL1
+	wait $pid
+	$DEBUG && cat $file
+
+	hdr="RTM_MISS.+"
+	what=""
+	addr="$IP4DST_FAIL1 link#2"
+	atf_check -s exit:0 -o match:"$hdr" -o match:"$what" -o match:"$addr" \
+		cat $file
+
+	# Test ping and a resulting routing message (RTM_MISS) off subnet
+	rump.route -n monitor -c 1 > $file &
+	pid=$!
+	sleep 1
+	atf_check -s exit:2 -o ignore -e ignore \
+		rump.ping -n -w 1 -c 1 $IP4DST_FAIL2
+	wait $pid
+	$DEBUG && cat $file
+
+	hdr="RTM_MISS.+"
+	what=""
+	addr="$IP4DST_FAIL2"
 	atf_check -s exit:0 -o match:"$hdr" -o match:"$what" -o match:"$addr" \
 		cat $file
 

Index: src/tests/net/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.35 src/tests/net/ndp/t_ndp.sh:1.36
--- src/tests/net/ndp/t_ndp.sh:1.35	Mon Aug 19 03:20:27 2019
+++ src/tests/net/ndp/t_ndp.sh	Tue Sep  3 19:07:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.35 2019/08/19 03:20:27 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.36 2019/09/03 19:07:50 roy Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -31,6 +31,8 @@ IP6SRC=fc00::1
 IP6SRC2=fc00::3
 IP6DST=fc00::2
 IP6NET=fc00::0
+IP6DST_FAIL1=fc00::99
+IP6DST_FAIL2=fc01::99
 
 DEBUG=${DEBUG:-false}
 TIMEOUT=1
@@ -454,7 +456,38 @@ ndp_rtm_body()
 
 	hdr="RTM_ADD.+"
 	what=""
-	addr="$IP6DST link#2"
+	addr="$IP6DST $macaddr_dst"
+	atf_check -s exit:0 -o match:"$hdr" -o match:"$what" -o match:"$addr" \
+		cat $file
+
+	# Test ping and a resulting routing message (RTM_MISS) on subnet
+	rump.route -n monitor -c 1 > $file &
+	pid=$!
+	sleep 1
+	# nd6_mmaxtries = 3, second between each try
+	atf_check -s exit:1 -o ignore -e ignore \
+		rump.ping6 -n -X 3 -c 3 $IP6DST_FAIL1
+	wait $pid
+	$DEBUG && cat $file
+
+	hdr="RTM_MISS.+"
+	what=""
+	addr="$IP6DST_FAIL1 link#2"
+	atf_check -s exit:0 -o match:"$hdr" -o match:"$what" -o match:"$addr" \
+		cat $file
+
+	# Test ping and a resulting routing message (RTM_MISS) off subnet
+	rump.route -n monitor -c 1 > $file &
+	pid=$!
+	sleep 1
+	atf_check -s exit:1 -o ignore -e ignore \
+		rump.ping6 -n -X 1 -c 1 $IP6DST_FAIL2
+	wait $pid
+	$DEBUG && cat $file
+
+	hdr="RTM_MISS.+"
+	what=""
+	addr="$IP6DST_FAIL2"
 	atf_check -s exit:0 -o match:"$hdr" -o match:"$what" -o match:"$addr" \
 		cat $file
 



CVS commit: src/tests/net

2019-09-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep  3 19:07:50 UTC 2019

Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/ndp: t_ndp.sh

Log Message:
tests: fix ARP and NDP tests for RTM_* messages

While here add tests for RTM_MISS.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.35 -r1.36 src/tests/net/ndp/t_ndp.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2019-09-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep  3 13:43:35 UTC 2019

Modified Files:
src/lib/libcurses: Makefile curses.h version.c
Removed Files:
src/lib/libcurses: cursesrelease.sh

Log Message:
curses: believe in unicorns

Hopefully this ends the bikeshed.
If you don't believe in unicorns, please #if 0 it out to preserve
the humour.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/lib/libcurses/Makefile
cvs rdiff -u -r1.125 -r1.126 src/lib/libcurses/curses.h
cvs rdiff -u -r1.1 -r0 src/lib/libcurses/cursesrelease.sh
cvs rdiff -u -r1.2 -r1.3 src/lib/libcurses/version.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/Makefile
diff -u src/lib/libcurses/Makefile:1.92 src/lib/libcurses/Makefile:1.93
--- src/lib/libcurses/Makefile:1.92	Tue Sep  3 10:36:17 2019
+++ src/lib/libcurses/Makefile	Tue Sep  3 13:43:34 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.92 2019/09/03 10:36:17 roy Exp $
+#	$NetBSD: Makefile,v 1.93 2019/09/03 13:43:34 roy Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/2/94
 
 .include 
@@ -210,8 +210,5 @@ SUBDIR.roff+= PSD.doc
 fileio.h: shlib_version genfileioh.awk
 	${TOOL_AWK} -f ${.CURDIR}/genfileioh.awk < ${.CURDIR}/shlib_version > ${.CURDIR}/fileio.h
 
-CURSES_VERSION!=	${HOST_SH} ${.CURDIR}/cursesrelease.sh
-CPPFLAGS.version.c+=	-DCURSES_VERSION=\"${CURSES_VERSION}\"
-
 .include 
 .include 

Index: src/lib/libcurses/curses.h
diff -u src/lib/libcurses/curses.h:1.125 src/lib/libcurses/curses.h:1.126
--- src/lib/libcurses/curses.h:1.125	Tue Sep  3 10:36:17 2019
+++ src/lib/libcurses/curses.h	Tue Sep  3 13:43:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses.h,v 1.125 2019/09/03 10:36:17 roy Exp $	*/
+/*	$NetBSD: curses.h,v 1.126 2019/09/03 13:43:34 roy Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -48,23 +48,6 @@
 #include 
 
 /*
- *	#define __NetBSD_Curses_Version__ MMmmrrpp00
- *
- * M = major version
- * m = minor version; a minor number of 99 indicates current
- * r = 0 (*)
- * p = patchlevel
- *
- * This is similar to __NetBSD_Version__ as found in sys/param.h
- * It is maintained seperately and has no correlation to it or the
- * ELF symver libcurses is built as.
- */
-#define	__NetBSD_Curses_Version__	02 /* NetBSD-Curses 2.0.0 */
-
-#define __NetBSD_Curses_Prereq__(M,m,p) (M) * 1) + \
-	(m) * 100) + (p) * 100) <= __NetBSD_Curses_Version__)
-
-/*
  * attr_t must be the same size as wchar_t (see ) to avoid padding
  * in __LDATA.
  */

Index: src/lib/libcurses/version.c
diff -u src/lib/libcurses/version.c:1.2 src/lib/libcurses/version.c:1.3
--- src/lib/libcurses/version.c:1.2	Tue Sep  3 10:36:17 2019
+++ src/lib/libcurses/version.c	Tue Sep  3 13:43:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.c,v 1.2 2019/09/03 10:36:17 roy Exp $	*/
+/*	$NetBSD: version.c,v 1.3 2019/09/03 13:43:34 roy Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -31,14 +31,36 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: version.c,v 1.2 2019/09/03 10:36:17 roy Exp $");
+__RCSID("$NetBSD: version.c,v 1.3 2019/09/03 13:43:34 roy Exp $");
 #endif
 
 #include "curses.h"
 
+#ifndef CURSES_VERSION
+/*
+ * Bikeshed about what the version should be, if any:
+ * https://mail-index.netbsd.org/tech-userlevel/2019/09/02/msg012101.html
+ * This is the end result and should at least provide some amusement :)
+ */
+#define	CURSES_VERSION	"believe in unicorns"
+#endif
+
+#ifdef CURSES_VERSION
+/*
+ * Any version given should be braced to give some indication it's not
+ * really a version recognised by NetBSD.
+ * It should also have some product branding to indicate from whence
+ * if came. For example, if FrobozzCo packaged it:
+ * CFLAGS+=	-DCURSES_VERSION="\"FrobozzCo 1.2.3\""
+ */
+#define	_CURSES_VERSION	" (" CURSES_VERSION ")"
+#else
+#define	_CURSES_VERSION
+#endif
+
 const char *
 curses_version()
 {
 
-	return "NetBSD-Curses " CURSES_VERSION;
+	return "NetBSD-Curses" _CURSES_VERSION;
 }



CVS commit: src/lib/libcurses

2019-09-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep  3 13:43:35 UTC 2019

Modified Files:
src/lib/libcurses: Makefile curses.h version.c
Removed Files:
src/lib/libcurses: cursesrelease.sh

Log Message:
curses: believe in unicorns

Hopefully this ends the bikeshed.
If you don't believe in unicorns, please #if 0 it out to preserve
the humour.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/lib/libcurses/Makefile
cvs rdiff -u -r1.125 -r1.126 src/lib/libcurses/curses.h
cvs rdiff -u -r1.1 -r0 src/lib/libcurses/cursesrelease.sh
cvs rdiff -u -r1.2 -r1.3 src/lib/libcurses/version.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2019-09-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep  3 10:36:17 UTC 2019

Modified Files:
src/lib/libcurses: Makefile curses.h version.c
Added Files:
src/lib/libcurses: cursesrelease.sh

Log Message:
curses: Add __NetBSD_Curses_Version__

Similar to __NetBSD_Version__ from sys/param.h but has no
correlation to it or the ELF symver libcurses is built as.

If we say that v1 was everything prior to this, it makes sense to
start this from v2.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/lib/libcurses/Makefile
cvs rdiff -u -r1.124 -r1.125 src/lib/libcurses/curses.h
cvs rdiff -u -r0 -r1.1 src/lib/libcurses/cursesrelease.sh
cvs rdiff -u -r1.1 -r1.2 src/lib/libcurses/version.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2019-09-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep  3 10:36:17 UTC 2019

Modified Files:
src/lib/libcurses: Makefile curses.h version.c
Added Files:
src/lib/libcurses: cursesrelease.sh

Log Message:
curses: Add __NetBSD_Curses_Version__

Similar to __NetBSD_Version__ from sys/param.h but has no
correlation to it or the ELF symver libcurses is built as.

If we say that v1 was everything prior to this, it makes sense to
start this from v2.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/lib/libcurses/Makefile
cvs rdiff -u -r1.124 -r1.125 src/lib/libcurses/curses.h
cvs rdiff -u -r0 -r1.1 src/lib/libcurses/cursesrelease.sh
cvs rdiff -u -r1.1 -r1.2 src/lib/libcurses/version.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/Makefile
diff -u src/lib/libcurses/Makefile:1.91 src/lib/libcurses/Makefile:1.92
--- src/lib/libcurses/Makefile:1.91	Mon Sep  2 09:08:29 2019
+++ src/lib/libcurses/Makefile	Tue Sep  3 10:36:17 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.91 2019/09/02 09:08:29 roy Exp $
+#	$NetBSD: Makefile,v 1.92 2019/09/03 10:36:17 roy Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/2/94
 
 .include 
@@ -210,10 +210,8 @@ SUBDIR.roff+= PSD.doc
 fileio.h: shlib_version genfileioh.awk
 	${TOOL_AWK} -f ${.CURDIR}/genfileioh.awk < ${.CURDIR}/shlib_version > ${.CURDIR}/fileio.h
 
-NETBSD_VERSION!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
-CPPFLAGS.version.c+=	-DNETBSD_VERSION=\"${NETBSD_VERSION}\"
-.PATH:			${NETBSDSRCDIR}/sys/sys
-version.o:		param.h
+CURSES_VERSION!=	${HOST_SH} ${.CURDIR}/cursesrelease.sh
+CPPFLAGS.version.c+=	-DCURSES_VERSION=\"${CURSES_VERSION}\"
 
 .include 
 .include 

Index: src/lib/libcurses/curses.h
diff -u src/lib/libcurses/curses.h:1.124 src/lib/libcurses/curses.h:1.125
--- src/lib/libcurses/curses.h:1.124	Mon Sep  2 09:08:29 2019
+++ src/lib/libcurses/curses.h	Tue Sep  3 10:36:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses.h,v 1.124 2019/09/02 09:08:29 roy Exp $	*/
+/*	$NetBSD: curses.h,v 1.125 2019/09/03 10:36:17 roy Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -48,6 +48,23 @@
 #include 
 
 /*
+ *	#define __NetBSD_Curses_Version__ MMmmrrpp00
+ *
+ * M = major version
+ * m = minor version; a minor number of 99 indicates current
+ * r = 0 (*)
+ * p = patchlevel
+ *
+ * This is similar to __NetBSD_Version__ as found in sys/param.h
+ * It is maintained seperately and has no correlation to it or the
+ * ELF symver libcurses is built as.
+ */
+#define	__NetBSD_Curses_Version__	02 /* NetBSD-Curses 2.0.0 */
+
+#define __NetBSD_Curses_Prereq__(M,m,p) (M) * 1) + \
+	(m) * 100) + (p) * 100) <= __NetBSD_Curses_Version__)
+
+/*
  * attr_t must be the same size as wchar_t (see ) to avoid padding
  * in __LDATA.
  */

Index: src/lib/libcurses/version.c
diff -u src/lib/libcurses/version.c:1.1 src/lib/libcurses/version.c:1.2
--- src/lib/libcurses/version.c:1.1	Mon Sep  2 09:08:29 2019
+++ src/lib/libcurses/version.c	Tue Sep  3 10:36:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.c,v 1.1 2019/09/02 09:08:29 roy Exp $	*/
+/*	$NetBSD: version.c,v 1.2 2019/09/03 10:36:17 roy Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: version.c,v 1.1 2019/09/02 09:08:29 roy Exp $");
+__RCSID("$NetBSD: version.c,v 1.2 2019/09/03 10:36:17 roy Exp $");
 #endif
 
 #include "curses.h"
@@ -40,5 +40,5 @@ const char *
 curses_version()
 {
 
-	return "NetBSD-Curses " NETBSD_VERSION;
+	return "NetBSD-Curses " CURSES_VERSION;
 }

Added files:

Index: src/lib/libcurses/cursesrelease.sh
diff -u /dev/null src/lib/libcurses/cursesrelease.sh:1.1
--- /dev/null	Tue Sep  3 10:36:17 2019
+++ src/lib/libcurses/cursesrelease.sh	Tue Sep  3 10:36:17 2019
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+#	$NetBSD: cursesrelease.sh,v 1.1 2019/09/03 10:36:17 roy Exp $
+#
+# Copyright (c) 1997 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Luke Mewburn.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO E

CVS commit: src

2019-09-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Sep  2 09:08:29 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libcurses: Makefile curses.3 curses.h
Added Files:
src/lib/libcurses: curses_version.3 version.c

Log Message:
curses(3): add curses_version()

Returns NetBSD-Curses %s
Where %s is the NetBSD version taken from sys/param.h

Discussed on tech-net@, only for ncurses compat.


To generate a diff of this commit:
cvs rdiff -u -r1.2284 -r1.2285 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.90 -r1.91 src/lib/libcurses/Makefile
cvs rdiff -u -r1.73 -r1.74 src/lib/libcurses/curses.3
cvs rdiff -u -r1.123 -r1.124 src/lib/libcurses/curses.h
cvs rdiff -u -r0 -r1.1 src/lib/libcurses/curses_version.3 \
src/lib/libcurses/version.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-09-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Sep  2 09:08:29 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libcurses: Makefile curses.3 curses.h
Added Files:
src/lib/libcurses: curses_version.3 version.c

Log Message:
curses(3): add curses_version()

Returns NetBSD-Curses %s
Where %s is the NetBSD version taken from sys/param.h

Discussed on tech-net@, only for ncurses compat.


To generate a diff of this commit:
cvs rdiff -u -r1.2284 -r1.2285 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.90 -r1.91 src/lib/libcurses/Makefile
cvs rdiff -u -r1.73 -r1.74 src/lib/libcurses/curses.3
cvs rdiff -u -r1.123 -r1.124 src/lib/libcurses/curses.h
cvs rdiff -u -r0 -r1.1 src/lib/libcurses/curses_version.3 \
src/lib/libcurses/version.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2284 src/distrib/sets/lists/comp/mi:1.2285
--- src/distrib/sets/lists/comp/mi:1.2284	Wed Aug 28 21:48:14 2019
+++ src/distrib/sets/lists/comp/mi	Mon Sep  2 09:08:29 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2284 2019/08/28 21:48:14 rmind Exp $
+#	$NetBSD: mi,v 1.2285 2019/09/02 09:08:29 roy Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -6336,6 +6336,7 @@
 ./usr/share/man/cat3/curses_touch.0		comp-c-catman		.cat
 ./usr/share/man/cat3/curses_tty.0		comp-c-catman		.cat
 ./usr/share/man/cat3/curses_underscore.0	comp-c-catman		.cat
+./usr/share/man/cat3/curses_version.0		comp-c-catman		.cat
 ./usr/share/man/cat3/curses_window.0		comp-c-catman		.cat
 ./usr/share/man/cat3/cuserid.0			comp-c-catman		.cat
 ./usr/share/man/cat3/d2i_ASN1_OBJECT.0	comp-c-catman	.cat,openssl=10
@@ -14342,6 +14343,7 @@
 ./usr/share/man/html3/curses_touch.html		comp-c-htmlman		html
 ./usr/share/man/html3/curses_tty.html		comp-c-htmlman		html
 ./usr/share/man/html3/curses_underscore.html	comp-c-htmlman		html
+./usr/share/man/html3/curses_version.html	comp-c-htmlman		html
 ./usr/share/man/html3/curses_window.html	comp-c-htmlman		html
 ./usr/share/man/html3/cuserid.html		comp-c-htmlman		html
 ./usr/share/man/html3/d2i_ASN1_OBJECT.html	comp-c-htmlman	html,openssl=10
@@ -22291,6 +22293,7 @@
 ./usr/share/man/man3/curses_touch.3		comp-c-man		.man
 ./usr/share/man/man3/curses_tty.3		comp-c-man		.man
 ./usr/share/man/man3/curses_underscore.3	comp-c-man		.man
+./usr/share/man/man3/curses_version.3		comp-c-man		.man
 ./usr/share/man/man3/curses_window.3		comp-c-man		.man
 ./usr/share/man/man3/cuserid.3			comp-c-man		.man
 ./usr/share/man/man3/d2i_ASN1_OBJECT.3	comp-c-man	.man,openssl=10

Index: src/lib/libcurses/Makefile
diff -u src/lib/libcurses/Makefile:1.90 src/lib/libcurses/Makefile:1.91
--- src/lib/libcurses/Makefile:1.90	Thu Nov 22 22:00:49 2018
+++ src/lib/libcurses/Makefile	Mon Sep  2 09:08:29 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.90 2018/11/22 22:00:49 uwe Exp $
+#	$NetBSD: Makefile,v 1.91 2019/09/02 09:08:29 roy Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/2/94
 
 .include 
@@ -25,7 +25,7 @@ SRCS=	acs.c addbytes.c addch.c addchnstr
 	mvwin.c newwin.c nodelay.c notimeout.c overlay.c overwrite.c pause.c \
 	printw.c putchar.c refresh.c resize.c ripoffline.c scanw.c screen.c \
 	scroll.c scrollok.c setterm.c slk.c standout.c syncok.c timeout.c \
-	toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c
+	toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c version.c
 
 MAN=	curses.3 curses_addch.3 curses_addchstr.3 curses_addstr.3 \
 	curses_attributes.3 curses_background.3 curses_border.3 \
@@ -37,7 +37,8 @@ MAN=	curses.3 curses_addch.3 curses_addc
 	curses_insdelln.3 curses_keyname.3 curses_line.3 curses_pad.3 \
 	curses_print.3 curses_refresh.3 curses_scanw.3 curses_screen.3 \
 	curses_scroll.3 curses_slk.3 curses_standout.3 curses_termcap.3 \
-	curses_touch.3 curses_tty.3 curses_underscore.3 curses_window.3
+	curses_touch.3 curses_tty.3 curses_underscore.3 curses_version.3 \
+	curses_window.3
 INCS=	curses.h unctrl.h
 INCSDIR=/usr/include
 
@@ -209,5 +210,10 @@ SUBDIR.roff+= PSD.doc
 fileio.h: shlib_version genfileioh.awk
 	${TOOL_AWK} -f ${.CURDIR}/genfileioh.awk < ${.CURDIR}/shlib_version > ${.CURDIR}/fileio.h
 
+NETBSD_VERSION!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+CPPFLAGS.version.c+=	-DNETBSD_VERSION=\"${NETBSD_VERSION}\"
+.PATH:			${NETBSDSRCDIR}/sys/sys
+version.o:		param.h
+
 .include 
 .include 

Index: src/lib/libcurses/curses.3
diff -u src/lib/libcurses/curses.3:1.73 src/lib/libcurses/curses.3:1.74
--- src/lib/libcurses/curses.3:1.73	Thu Oct 25 10:36:56 2018
+++ src/lib/libcurses/curses.3	Mon Sep  2 09:08:29 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses.3,v 1.73 2018/10/25 10:36:56 uwe Exp $
+.\"	$NetBSD: curses.3,v 1.74 2019/09/02 09:08:29 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"

CVS commit: src/sbin/route

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Sep  2 00:30:01 UTC 2019

Modified Files:
src/sbin/route: route.c

Log Message:
route(8): Show addres for RTM_LOSING

While here, add /* FALLTHROUGH */.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/route

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Sep  2 00:30:01 UTC 2019

Modified Files:
src/sbin/route: route.c

Log Message:
route(8): Show addres for RTM_LOSING

While here, add /* FALLTHROUGH */.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.162 src/sbin/route/route.c:1.163
--- src/sbin/route/route.c:1.162	Sat Aug 31 18:20:08 2019
+++ src/sbin/route/route.c	Mon Sep  2 00:30:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.162 2019/08/31 18:20:08 roy Exp $	*/
+/*	$NetBSD: route.c,v 1.163 2019/09/02 00:30:01 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: route.c,v 1.162 2019/08/31 18:20:08 roy Exp $");
+__RCSID("$NetBSD: route.c,v 1.163 2019/09/02 00:30:01 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -1459,10 +1459,11 @@ print_rtmsg(struct rt_msghdr *rtm, int m
 		}
 		printf("\n");
 		break;
-	case RTM_ADD:
-	case RTM_CHANGE:
-	case RTM_DELETE:
-	case RTM_GET:
+	case RTM_ADD:		/* FALLTHROUGH */
+	case RTM_CHANGE:	/* FALLTHROUGH */
+	case RTM_DELETE:	/* FALLTHROUGH */
+	case RTM_GET:		/* FALLTHROUGH */
+	case RTM_LOSING:	/* FALLTHROUGH */
 	case RTM_MISS:
 		(void)printf("pid %d, seq %d, errno %d, flags: ",
 			rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno);



CVS commit: src/doc

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 22:10:13 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Note inet change as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2576 -r1.2577 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/CHANGES
diff -u src/doc/CHANGES:1.2576 src/doc/CHANGES:1.2577
--- src/doc/CHANGES:1.2576	Sun Sep  1 19:29:33 2019
+++ src/doc/CHANGES	Sun Sep  1 22:10:13 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2576 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2577 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -35,3 +35,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	inet6: Fix sending RTM_MISS for unresolvable addresses and restore
 		ND6_LLINFO_WAITDELETE so that any send at this point can
 		return EHOSTDOWN to match inet behaviour. [roy 20190901]
+	inet: Fix sending RTM_MISS for unresolvable addresses. [roy 20190901]



CVS commit: src/doc

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 22:10:13 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Note inet change as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2576 -r1.2577 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/sys/netinet

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 22:09:02 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
inet: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.
This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This tells us when a new lladdr has been added (RTM_ADD),
changed (RTM_CHANGE), deleted (RTM_DELETED) or has failed to been
resolved (RTM_MISS). The latter case can be interpreted as unreachable.


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 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/netinet

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 22:09:02 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
inet: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.
This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This tells us when a new lladdr has been added (RTM_ADD),
changed (RTM_CHANGE), deleted (RTM_DELETED) or has failed to been
resolved (RTM_MISS). The latter case can be interpreted as unreachable.


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 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.286 src/sys/netinet/if_arp.c:1.287
--- src/sys/netinet/if_arp.c:1.286	Fri Aug 30 18:52:00 2019
+++ src/sys/netinet/if_arp.c	Sun Sep  1 22:09:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.286 2019/08/30 18:52:00 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.287 2019/09/01 22:09:02 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.286 2019/08/30 18:52:00 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.287 2019/09/01 22:09:02 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -315,6 +315,17 @@ arptimer(void *arg)
 	if (lle->la_flags & LLE_LINKED) {
 		size_t pkts_dropped;
 
+		if (lle->la_flags & LLE_VALID) {
+			struct in_addr *in;
+			struct sockaddr_in sin;
+			const char *lladdr;
+
+			in = >r_l3addr.addr4;
+			sockaddr_in_init(, in, 0);
+			lladdr = (const char *)>ll_addr;
+			rt_clonedmsg(RTM_DELETE, sintosa(), lladdr, ifp);
+		}
+
 		LLE_REMREF(lle);
 		pkts_dropped = llentry_free(lle);
 		ARP_STATADD(ARP_STAT_DFRDROPPED, pkts_dropped);
@@ -745,14 +756,8 @@ notfound:
 			rt_unref(_rt);
 		if (la == NULL)
 			ARP_STATINC(ARP_STAT_ALLOCFAIL);
-		else {
-			struct sockaddr_in sin;
-
+		else
 			arp_init_llentry(ifp, la);
-			sockaddr_in_init(, >r_l3addr.addr4, 0);
-			if (rt != NULL)
-rt_clonedmsg(RTM_ADD, sintosa(), NULL, ifp);
-		}
 	} else if (LLE_TRY_UPGRADE(la) == 0) {
 		create_lookup = "lookup";
 		LLE_RUNLOCK(la);
@@ -852,9 +857,16 @@ notfound:
 
 	if (renew) {
 		const uint8_t *enaddr = CLLADDR(ifp->if_sadl);
+		struct sockaddr_in sin;
+
 		la->la_expire = time_uptime;
 		arp_settimer(la, arpt_down);
 		la->la_asked++;
+
+		sockaddr_in_init(, >r_l3addr.addr4, 0);
+		if (error != EWOULDBLOCK)
+			rt_clonedmsg(RTM_MISS, sintosa(), NULL, ifp);
+
 		LLE_WUNLOCK(la);
 
 		if (rt != NULL) {
@@ -862,11 +874,8 @@ notfound:
 			(rt->rt_ifa->ifa_addr)->sin_addr,
 			(dst)->sin_addr, enaddr);
 		} else {
-			struct sockaddr_in sin;
 			struct rtentry *_rt;
 
-			sockaddr_in_init(, >r_l3addr.addr4, 0);
-
 			/* XXX */
 			_rt = rtalloc1((struct sockaddr *), 0);
 			if (_rt == NULL)
@@ -1007,7 +1016,7 @@ in_arpinput(struct mbuf *m)
 #endif
 	struct sockaddr sa;
 	struct in_addr isaddr, itaddr, myaddr;
-	int op;
+	int op, rt_cmd;
 	void *tha;
 	uint64_t *arps;
 	struct psref psref, psref_ia;
@@ -1217,7 +1226,9 @@ in_arpinput(struct mbuf *m)
 "for %s by %s\n",
 IN_PRINT(ipbuf, ), llastr);
 		}
-	}
+		rt_cmd = RTM_CHANGE;
+	} else
+		rt_cmd = la->la_flags & LLE_VALID ? 0 : RTM_ADD;
 
 	KASSERT(ifp->if_sadl->sdl_alen == ifp->if_addrlen);
 
@@ -1259,6 +1270,13 @@ in_arpinput(struct mbuf *m)
 	la->la_asked = 0;
 	/* rt->rt_flags &= ~RTF_REJECT; */
 
+	if (rt_cmd != 0) {
+		struct sockaddr_in sin;
+
+		sockaddr_in_init(, >r_l3addr.addr4, 0);
+		rt_clonedmsg(rt_cmd, sintosa(), ar_sha(ah), ifp);
+	}
+
 	if (la->la_hold != NULL) {
 		int n = la->la_numheld;
 		struct mbuf *m_hold, *m_hold_next;



CVS commit: src/doc

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 19:29:33 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Document recent inet6 changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2575 -r1.2576 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/CHANGES
diff -u src/doc/CHANGES:1.2575 src/doc/CHANGES:1.2576
--- src/doc/CHANGES:1.2575	Fri Aug 30 08:40:25 2019
+++ src/doc/CHANGES	Sun Sep  1 19:29:33 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2575 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2576 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -32,3 +32,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]
 	dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821]
+	inet6: Fix sending RTM_MISS for unresolvable addresses and restore
+		ND6_LLINFO_WAITDELETE so that any send at this point can
+		return EHOSTDOWN to match inet behaviour. [roy 20190901]



CVS commit: src/doc

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 19:29:33 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Document recent inet6 changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2575 -r1.2576 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/sys/netinet6

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 19:26:22 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c nd6.h

Log Message:
inet6: Re-introduce ND6_LLINFO_WAITDELETE so we can return EHOSTDOWN

Once we've sent nd6_mmaxtries NS messages, send RTM_MISS and move to the
ND6_LLINFO_WAITDELETE state rather than freeing the llentry right away.
Wait for a probe cycle and then free the llentry.

If a connection attempts to re-use the llentry during ND6_LLINFO_WAITDELETE,
return EHOSTDOWN (or EHOSTUNREACH if a gateway) to match inet behaviour.
Continue to ND6_LLINFO_INCOMPLETE and send another NS probe in hope of a
reply. Rinse and repeat.

This reverts part of nd6.c r1.14 - an 18 year old commit!


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.86 -r1.87 src/sys/netinet6/nd6.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 19:26:22 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c nd6.h

Log Message:
inet6: Re-introduce ND6_LLINFO_WAITDELETE so we can return EHOSTDOWN

Once we've sent nd6_mmaxtries NS messages, send RTM_MISS and move to the
ND6_LLINFO_WAITDELETE state rather than freeing the llentry right away.
Wait for a probe cycle and then free the llentry.

If a connection attempts to re-use the llentry during ND6_LLINFO_WAITDELETE,
return EHOSTDOWN (or EHOSTUNREACH if a gateway) to match inet behaviour.
Continue to ND6_LLINFO_INCOMPLETE and send another NS probe in hope of a
reply. Rinse and repeat.

This reverts part of nd6.c r1.14 - an 18 year old commit!


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.86 -r1.87 src/sys/netinet6/nd6.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/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.262 src/sys/netinet6/nd6.c:1.263
--- src/sys/netinet6/nd6.c:1.262	Sun Sep  1 18:54:38 2019
+++ src/sys/netinet6/nd6.c	Sun Sep  1 19:26:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.262 2019/09/01 18:54:38 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.263 2019/09/01 19:26:21 roy Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.262 2019/09/01 18:54:38 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.263 2019/09/01 19:26:21 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -480,9 +480,14 @@ nd6_llinfo_timer(void *arg)
 	ndi = ND_IFINFO(ifp);
 
 	switch (ln->ln_state) {
+	case ND6_LLINFO_WAITDELETE:
+		LLE_REMREF(ln);
+		nd6_free(ln, 0);
+		ln = NULL;
+		break;
+
 	case ND6_LLINFO_INCOMPLETE:
-		if (ln->ln_asked < nd6_mmaxtries) {
-			ln->ln_asked++;
+		if (ln->ln_asked++ < nd6_mmaxtries) {
 			send_ns = true;
 			break;
 		}
@@ -506,9 +511,17 @@ nd6_llinfo_timer(void *arg)
 		sockaddr_in6_init(, taddr6, 0, 0, 0);
 		rt_clonedmsg(RTM_MISS, sin6tosa(), NULL, ifp);
 
-		LLE_REMREF(ln);
-		nd6_free(ln, 0);
-		ln = NULL;
+		/*
+		 * Move to the ND6_LLINFO_WAITDELETE state for another
+		 * interval at which point the llentry will be freed
+		 * unless it's attempted to be used again and we'll
+		 * resend NS again, rinse and repeat.
+		 */
+		ln->ln_state = ND6_LLINFO_WAITDELETE;
+		if (ln->ln_asked == nd6_mmaxtries)
+			nd6_llinfo_settimer(ln, ndi->retrans * hz / 1000);
+		else
+			send_ns = true;
 		break;
 
 	case ND6_LLINFO_REACHABLE:
@@ -2312,6 +2325,7 @@ nd6_resolve(struct ifnet *ifp, const str
 	struct llentry *ln = NULL;
 	bool created = false;
 	const struct sockaddr_in6 *dst = satocsin6(_dst);
+	int error;
 
 	/* discard the packet if IPv6 operation is disabled on the interface */
 	if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) {
@@ -2406,7 +2420,8 @@ nd6_resolve(struct ifnet *ifp, const str
 	 * does not exceed nd6_maxqueuelen.  When it exceeds nd6_maxqueuelen,
 	 * the oldest packet in the queue will be removed.
 	 */
-	if (ln->ln_state == ND6_LLINFO_NOSTATE)
+	if (ln->ln_state == ND6_LLINFO_NOSTATE ||
+	ln->ln_state == ND6_LLINFO_WAITDELETE)
 		ln->ln_state = ND6_LLINFO_INCOMPLETE;
 	if (ln->ln_hold) {
 		struct mbuf *m_hold;
@@ -2430,6 +2445,12 @@ nd6_resolve(struct ifnet *ifp, const str
 		ln->ln_hold = m;
 	}
 
+	if (ln->ln_asked >= nd6_mmaxtries)
+		error = (rt != NULL && rt->rt_flags & RTF_GATEWAY) ?
+		EHOSTUNREACH : EHOSTDOWN;
+	else
+		error = EWOULDBLOCK;
+
 	/*
 	 * If there has been no NS for the neighbor after entering the
 	 * INCOMPLETE state, send the first solicitation.
@@ -2448,7 +2469,7 @@ nd6_resolve(struct ifnet *ifp, const str
 	if (created)
 		nd6_gc_neighbors(LLTABLE6(ifp), >sin6_addr);
 
-	return EWOULDBLOCK;
+	return error;
 }
 
 int

Index: src/sys/netinet6/nd6.h
diff -u src/sys/netinet6/nd6.h:1.86 src/sys/netinet6/nd6.h:1.87
--- src/sys/netinet6/nd6.h:1.86	Tue Mar  6 10:57:00 2018
+++ src/sys/netinet6/nd6.h	Sun Sep  1 19:26:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.h,v 1.86 2018/03/06 10:57:00 roy Exp $	*/
+/*	$NetBSD: nd6.h,v 1.87 2019/09/01 19:26:21 roy Exp $	*/
 /*	$KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $	*/
 
 /*
@@ -38,14 +38,7 @@
 
 #define ND6_LLINFO_PURGE	-3
 #define ND6_LLINFO_NOSTATE	-2
-/*
- * We don't need the WAITDELETE state any more, but we keep the definition
- * in a comment line instead of removing it. This is necessary to avoid
- * unintentionally reusing the value for another purpose, which might
- * affect backward compatibility with old applications.
- * (2711 jin...@kame.net)
- */
-/* #define ND6_LLINFO_WAITDELETE	-1 */
+#define ND6_LLINFO_WAITDELETE	-1
 #define ND6_LLINFO_INCOMPLETE	0
 #define ND6_LLINFO_REACHABLE	1
 #define ND6_LLINFO_STALE	2



CVS commit: src/sys

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 18:54:38 UTC 2019

Modified Files:
src/sys/net: rtsock.c
src/sys/netinet6: nd6.c nd6_nbr.c

Log Message:
inet6: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.
This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This results in less messages via route(4) and tells us when a new
lladdr has been added (RTM_ADD), changed (RTM_CHANGE), deleted (RTM_DELETED)
or has failed to been resolved (RTM_MISS). The latter case can be
interpreted as unreachable.


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/net/rtsock.c
cvs rdiff -u -r1.261 -r1.262 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.171 -r1.172 src/sys/netinet6/nd6_nbr.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/rtsock.c
diff -u src/sys/net/rtsock.c:1.251 src/sys/net/rtsock.c:1.252
--- src/sys/net/rtsock.c:1.251	Thu Aug 22 21:14:45 2019
+++ src/sys/net/rtsock.c	Sun Sep  1 18:54:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.251 2019/08/22 21:14:45 roy Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.252 2019/09/01 18:54:38 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.251 2019/08/22 21:14:45 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.252 2019/09/01 18:54:38 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -152,21 +152,21 @@ rt_clonedmsg(int type, const struct sock
 	/* Mimic flags exactly */
 #define RTF_LLINFO	0x400
 #define RTF_CLONED	0x2000
-	int flags = RTF_HOST | RTF_DONE | RTF_LLINFO | RTF_CLONED;
+	int flags = RTF_DONE;
 	union {
 		struct sockaddr sa;
 		struct sockaddr_storage ss;
 		struct sockaddr_dl sdl;
 	} u;
-	uint8_t namelen = strlen(ifp->if_xname);
-	uint8_t addrlen = ifp->if_addrlen;
 
-	if (type != RTM_DELETE)
+	if (type != RTM_MISS)
+		flags |= RTF_HOST | RTF_CLONED | RTF_LLINFO;
+	if (type == RTM_ADD || type == RTM_CHANGE)
 		flags |= RTF_UP;
 	memset(, 0, sizeof(info));
 	info.rti_info[RTAX_DST] = dst;
 	sockaddr_dl_init(, sizeof(u.ss), ifp->if_index, ifp->if_type,
-	NULL, namelen, lladdr, addrlen);
+	NULL, 0, lladdr, ifp->if_addrlen);
 	info.rti_info[RTAX_GATEWAY] = 
 
 	rt_missmsg(type, , flags, 0);

Index: src/sys/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.261 src/sys/netinet6/nd6.c:1.262
--- src/sys/netinet6/nd6.c:1.261	Sat Aug 31 01:49:45 2019
+++ src/sys/netinet6/nd6.c	Sun Sep  1 18:54:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.261 2019/08/31 01:49:45 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.262 2019/09/01 18:54:38 roy Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.261 2019/08/31 01:49:45 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.262 2019/09/01 18:54:38 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -461,6 +461,8 @@ nd6_llinfo_timer(void *arg)
 	struct nd_ifinfo *ndi = NULL;
 	bool send_ns = false;
 	const struct in6_addr *daddr6 = NULL;
+	const struct in6_addr *taddr6 = >r_l3addr.addr6;
+	struct sockaddr_in6 sin6;
 
 	SOFTNET_KERNEL_LOCK_UNLESS_NET_MPSAFE();
 
@@ -472,7 +474,6 @@ nd6_llinfo_timer(void *arg)
 		goto out;
 	}
 
-
 	ifp = ln->lle_tbl->llt_ifp;
 	KASSERT(ifp != NULL);
 
@@ -483,29 +484,33 @@ nd6_llinfo_timer(void *arg)
 		if (ln->ln_asked < nd6_mmaxtries) {
 			ln->ln_asked++;
 			send_ns = true;
-		} else {
-			struct mbuf *m = ln->ln_hold;
-			if (m) {
-struct mbuf *m0;
+			break;
+		}
 
-/*
- * assuming every packet in ln_hold has
- * the same IP header
- */
-m0 = m->m_nextpkt;
-m->m_nextpkt = NULL;
-ln->ln_hold = m0;
-clear_llinfo_pqueue(ln);
- 			}
-			LLE_REMREF(ln);
-			nd6_free(ln, 0);
-			ln = NULL;
-			if (m != NULL) {
-icmp6_error2(m, ICMP6_DST_UNREACH,
-ICMP6_DST_UNREACH_ADDR, 0, ifp);
-			}
+		if (ln->ln_hold) {
+			struct mbuf *m = ln->ln_hold, *m0;
+
+			/*
+			 * assuming every packet in ln_hold has
+			 * the same IP header
+			 */
+			m0 = m->m_nextpkt;
+			m->m_nextpkt = NULL;
+			ln->ln_hold = m0;
+			clear_llinfo_pqueue(ln);
+
+			icmp6_error2(m, ICMP6_DST_UNREACH,
+			ICMP6_DST_UNREACH_ADDR, 0, ifp);
 		}
+
+		sockaddr_in6_init(, taddr6, 0, 0, 0);
+		rt_clonedmsg(RTM_MISS, sin6tosa(), NULL, ifp);
+
+		LLE_REMREF(ln);
+		nd6_free(ln, 0);
+		ln = NULL;
 		break;
+
 	case ND6_LLINFO_REACHABLE:
 		if (!ND6_LLINFO_PERMANENT(ln)) {
 			ln->ln_state = ND6_LLINFO_STALE;
@@ -550,7 +555,6 @@ nd6_llinfo_timer(void *arg)
 
 	if (send_ns) {
 		struct in6_addr src,

CVS commit: src/sys

2019-09-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep  1 18:54:38 UTC 2019

Modified Files:
src/sys/net: rtsock.c
src/sys/netinet6: nd6.c nd6_nbr.c

Log Message:
inet6: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.
This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This results in less messages via route(4) and tells us when a new
lladdr has been added (RTM_ADD), changed (RTM_CHANGE), deleted (RTM_DELETED)
or has failed to been resolved (RTM_MISS). The latter case can be
interpreted as unreachable.


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/net/rtsock.c
cvs rdiff -u -r1.261 -r1.262 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.171 -r1.172 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/route

2019-08-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Aug 31 18:20:08 UTC 2019

Modified Files:
src/sbin/route: route.c

Log Message:
route(8): show addrs for RTM_MISS


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.161 src/sbin/route/route.c:1.162
--- src/sbin/route/route.c:1.161	Thu Aug 22 16:10:48 2019
+++ src/sbin/route/route.c	Sat Aug 31 18:20:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.161 2019/08/22 16:10:48 roy Exp $	*/
+/*	$NetBSD: route.c,v 1.162 2019/08/31 18:20:08 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: route.c,v 1.161 2019/08/22 16:10:48 roy Exp $");
+__RCSID("$NetBSD: route.c,v 1.162 2019/08/31 18:20:08 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -1463,6 +1463,7 @@ print_rtmsg(struct rt_msghdr *rtm, int m
 	case RTM_CHANGE:
 	case RTM_DELETE:
 	case RTM_GET:
+	case RTM_MISS:
 		(void)printf("pid %d, seq %d, errno %d, flags: ",
 			rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno);
 		bprintf(stdout, rtm->rtm_flags, routeflags);



CVS commit: src/sbin/route

2019-08-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Aug 31 18:20:08 UTC 2019

Modified Files:
src/sbin/route: route.c

Log Message:
route(8): show addrs for RTM_MISS


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Aug 31 01:49:46 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c

Log Message:
inet6: don't set an invalid lladdr in nd6_free()

We don't want to announce that we've deleted a hwaddr of all zeros.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/sys/netinet6/nd6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Aug 31 01:49:46 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c

Log Message:
inet6: don't set an invalid lladdr in nd6_free()

We don't want to announce that we've deleted a hwaddr of all zeros.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/sys/netinet6/nd6.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/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.260 src/sys/netinet6/nd6.c:1.261
--- src/sys/netinet6/nd6.c:1.260	Tue Aug 27 21:11:26 2019
+++ src/sys/netinet6/nd6.c	Sat Aug 31 01:49:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.260 2019/08/27 21:11:26 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.261 2019/08/31 01:49:45 roy Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.260 2019/08/27 21:11:26 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.261 2019/08/31 01:49:45 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1192,6 +1192,7 @@ nd6_free(struct llentry *ln, int gc)
 	struct ifnet *ifp;
 	struct in6_addr *in6;
 	struct sockaddr_in6 sin6;
+	const char *lladdr;
 
 	KASSERT(ln != NULL);
 	LLE_WLOCK_ASSERT(ln);
@@ -1282,8 +1283,8 @@ nd6_free(struct llentry *ln, int gc)
 	}
 
 	sockaddr_in6_init(, in6, 0, 0, 0);
-	rt_clonedmsg(RTM_DELETE, sin6tosa(),
-	(const uint8_t *)>ll_addr, ifp);
+	lladdr = ln->la_flags & LLE_VALID ? (const char *)>ll_addr : NULL;
+	rt_clonedmsg(RTM_DELETE, sin6tosa(), lladdr, ifp);
 
 	/*
 	 * Save to unlock. We still hold an extra reference and will not



CVS commit: src/sys/netinet

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Aug 30 18:52:00 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
ARP: change default sysctl entry log_movements to 0

IP address sharing is a thing and shouldn't cause needless diagnostics
by default.


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 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.285 src/sys/netinet/if_arp.c:1.286
--- src/sys/netinet/if_arp.c:1.285	Fri Aug 30 18:48:34 2019
+++ src/sys/netinet/if_arp.c	Fri Aug 30 18:52:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.285 2019/08/30 18:48:34 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.286 2019/08/30 18:52:00 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.285 2019/08/30 18:48:34 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.286 2019/08/30 18:52:00 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -209,7 +209,7 @@ static struct ifnet *myip_ifp = NULL;
 
 static int arp_drainwanted;
 
-static int log_movements = 1;
+static int log_movements = 0;
 static int log_permanent_modify = 1;
 static int log_wrong_iface = 1;
 



CVS commit: src/sys/netinet

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Aug 30 18:52:00 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
ARP: change default sysctl entry log_movements to 0

IP address sharing is a thing and shouldn't cause needless diagnostics
by default.


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 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/netinet

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Aug 30 18:48:34 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
ARP: remove unused sysctl entry log_unknown_network


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 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.284 src/sys/netinet/if_arp.c:1.285
--- src/sys/netinet/if_arp.c:1.284	Thu Aug 22 21:14:46 2019
+++ src/sys/netinet/if_arp.c	Fri Aug 30 18:48:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.284 2019/08/22 21:14:46 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.285 2019/08/30 18:48:34 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.284 2019/08/22 21:14:46 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.285 2019/08/30 18:48:34 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -212,7 +212,6 @@ static int arp_drainwanted;
 static int log_movements = 1;
 static int log_permanent_modify = 1;
 static int log_wrong_iface = 1;
-static int log_unknown_network = 1;
 
 DOMAIN_DEFINE(arpdomain);	/* forward declare and add to link set */
 
@@ -2078,13 +2077,6 @@ sysctl_net_inet_arp_setup(struct sysctll
 
 	sysctl_createv(clog, 0, NULL, NULL,
 			CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-			CTLTYPE_INT, "log_unknown_network",
-			SYSCTL_DESCR("log ARP packets from non-local network"),
-			NULL, 0, _unknown_network, 0,
-			CTL_NET,PF_INET, node->sysctl_num, CTL_CREATE, CTL_EOL);
-
-	sysctl_createv(clog, 0, NULL, NULL,
-			CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 			CTLTYPE_INT, "debug",
 			SYSCTL_DESCR("Enable ARP DAD debug output"),
 			NULL, 0, _debug, 0,



CVS commit: src/sys/netinet

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Aug 30 18:48:34 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
ARP: remove unused sysctl entry log_unknown_network


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 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

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Aug 30 08:40:25 UTC 2019

Modified Files:
src/doc: CHANGES
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: Revert prior

It's not needed, listing to RA is enough as discussed on tech-net.


To generate a diff of this commit:
cvs rdiff -u -r1.2574 -r1.2575 src/doc/CHANGES
cvs rdiff -u -r1.170 -r1.171 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-08-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Aug 30 08:40:25 UTC 2019

Modified Files:
src/doc: CHANGES
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: Revert prior

It's not needed, listing to RA is enough as discussed on tech-net.


To generate a diff of this commit:
cvs rdiff -u -r1.2574 -r1.2575 src/doc/CHANGES
cvs rdiff -u -r1.170 -r1.171 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2574 src/doc/CHANGES:1.2575
--- src/doc/CHANGES:1.2574	Thu Aug 29 17:54:32 2019
+++ src/doc/CHANGES	Fri Aug 30 08:40:25 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2574 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2575 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -32,5 +32,3 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]
 	dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821]
-	inet6: Announce Router to Host via RTM_CHANGE without a lladdr.
-		dhcpcd no longer needs to parse NA messages. [roy 20190829]

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.170 src/sys/netinet6/nd6_nbr.c:1.171
--- src/sys/netinet6/nd6_nbr.c:1.170	Thu Aug 29 16:26:43 2019
+++ src/sys/netinet6/nd6_nbr.c	Fri Aug 30 08:40:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.170 2019/08/29 16:26:43 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.171 2019/08/30 08:40:25 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.170 2019/08/29 16:26:43 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.171 2019/08/30 08:40:25 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -856,25 +856,6 @@ nd6_na_input(struct mbuf *m, int off, in
 			 */
 			const struct in6_addr *in6 = >r_l3addr.addr6;
 			struct nd_defrouter *dr;
-			struct sockaddr_in6 sin6;
-
-			/*
-			 * Userland really has no business with NA messages.
-			 * However, RFC 4861 6.2.5 only says departing routers
-			 * *SHOULD* send RA with lifetime of zero and *MUST*
-			 * send all subsequent NA messages if the router flag
-			 * unset.
-			 *
-			 * To help userland avoid the expensive process of
-			 * parsing NA messages, send RTM_CHANGE without a
-			 * lladdr in the gateway.
-			 * This is different from the intial RTM_ADD also
-			 * without a lladdr in the gateway and RTM_DELETE.
-			 */
-			sockaddr_in6_init(, in6, 0, 0, 0);
-			rt_clonedmsg(RTM_CHANGE, sin6tosa(), NULL,
-			ln->lle_tbl->llt_ifp);
-			rt_announce = true;
 
 			ND6_WLOCK();
 			dr = nd6_defrouter_lookup(in6, ln->lle_tbl->llt_ifp);



CVS commit: src/doc

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 17:54:32 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Note inet6 change about router -> host.


To generate a diff of this commit:
cvs rdiff -u -r1.2573 -r1.2574 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/CHANGES
diff -u src/doc/CHANGES:1.2573 src/doc/CHANGES:1.2574
--- src/doc/CHANGES:1.2573	Wed Aug 21 17:14:26 2019
+++ src/doc/CHANGES	Thu Aug 29 17:54:32 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2573 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2574 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -32,3 +32,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]
 	dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821]
+	inet6: Announce Router to Host via RTM_CHANGE without a lladdr.
+		dhcpcd no longer needs to parse NA messages. [roy 20190829]



CVS commit: src/doc

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 17:54:32 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Note inet6 change about router -> host.


To generate a diff of this commit:
cvs rdiff -u -r1.2573 -r1.2574 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/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 16:26:43 UTC 2019

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
Userland really has no business with NA messages.
However, RFC 4861 6.2.5 only says departing routers
*SHOULD* send RA with lifetime of zero and *MUST*
send all subsequent NA messages if the router flag
unset.

To help userland avoid the expensive process of
parsing NA messages, send RTM_CHANGE without a
lladdr in the gateway.
This is different from the intial RTM_ADD also
without a lladdr in the gateway and RTM_DELETE.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 16:26:43 UTC 2019

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
Userland really has no business with NA messages.
However, RFC 4861 6.2.5 only says departing routers
*SHOULD* send RA with lifetime of zero and *MUST*
send all subsequent NA messages if the router flag
unset.

To help userland avoid the expensive process of
parsing NA messages, send RTM_CHANGE without a
lladdr in the gateway.
This is different from the intial RTM_ADD also
without a lladdr in the gateway and RTM_DELETE.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/nd6_nbr.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/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.169 src/sys/netinet6/nd6_nbr.c:1.170
--- src/sys/netinet6/nd6_nbr.c:1.169	Thu Aug 29 14:28:06 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 29 16:26:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.170 2019/08/29 16:26:43 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.170 2019/08/29 16:26:43 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -854,10 +854,27 @@ nd6_na_input(struct mbuf *m, int off, in
 			 * Remove the sender from the Default Router List and
 			 * update the Destination Cache entries.
 			 */
+			const struct in6_addr *in6 = >r_l3addr.addr6;
 			struct nd_defrouter *dr;
-			const struct in6_addr *in6;
+			struct sockaddr_in6 sin6;
 
-			in6 = >r_l3addr.addr6;
+			/*
+			 * Userland really has no business with NA messages.
+			 * However, RFC 4861 6.2.5 only says departing routers
+			 * *SHOULD* send RA with lifetime of zero and *MUST*
+			 * send all subsequent NA messages if the router flag
+			 * unset.
+			 *
+			 * To help userland avoid the expensive process of
+			 * parsing NA messages, send RTM_CHANGE without a
+			 * lladdr in the gateway.
+			 * This is different from the intial RTM_ADD also
+			 * without a lladdr in the gateway and RTM_DELETE.
+			 */
+			sockaddr_in6_init(, in6, 0, 0, 0);
+			rt_clonedmsg(RTM_CHANGE, sin6tosa(), NULL,
+			ln->lle_tbl->llt_ifp);
+			rt_announce = true;
 
 			ND6_WLOCK();
 			dr = nd6_defrouter_lookup(in6, ln->lle_tbl->llt_ifp);
@@ -887,8 +904,9 @@ nd6_na_input(struct mbuf *m, int off, in
 	if (rt_announce) {
 		struct sockaddr_in6 sin6;
 
-		sockaddr_in6_init(, , 0, 0, 0);
-		rt_clonedmsg(RTM_CHANGE, sin6tosa(), lladdr, ifp);
+		sockaddr_in6_init(, >r_l3addr.addr6, 0, 0, 0);
+		rt_clonedmsg(RTM_CHANGE, sin6tosa(),
+		(char *)>ll_addr, ln->lle_tbl->llt_ifp);
 	}
 
  freeit:



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:28:06 UTC 2019

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
more bool


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netinet6/nd6_nbr.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/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.168 src/sys/netinet6/nd6_nbr.c:1.169
--- src/sys/netinet6/nd6_nbr.c:1.168	Thu Aug 29 14:26:55 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 29 14:28:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -735,7 +735,7 @@ nd6_na_input(struct mbuf *m, int off, in
 	if (ln == NULL)
 		goto freeit;
 
-	rt_announce = 0;
+	rt_announce = false;
 	if (ln->ln_state == ND6_LLINFO_INCOMPLETE) {
 		/*
 		 * If the link-layer has address, and no lladdr option came,
@@ -749,7 +749,7 @@ nd6_na_input(struct mbuf *m, int off, in
 		 */
 		memcpy(>ll_addr, lladdr, ifp->if_addrlen);
 		ln->la_flags |= LLE_VALID;
-		rt_announce = 1;
+		rt_announce = true;
 		if (is_solicited) {
 			ln->ln_state = ND6_LLINFO_REACHABLE;
 			ln->ln_byhint = 0;



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:28:06 UTC 2019

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
more bool


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:26:55 UTC 2019

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: change rt_announce and llchange to bool in nd6_na_input()


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet6/nd6_nbr.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/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.167 src/sys/netinet6/nd6_nbr.c:1.168
--- src/sys/netinet6/nd6_nbr.c:1.167	Thu Aug 22 21:22:50 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 29 14:26:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.167 2019/08/22 21:22:50 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.167 2019/08/22 21:22:50 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -611,7 +611,7 @@ nd6_na_input(struct mbuf *m, int off, in
 	struct llentry *ln = NULL;
 	union nd_opts ndopts;
 	struct sockaddr_in6 ssin6;
-	int rt_announce;
+	bool rt_announce;
 	bool checklink = false;
 	struct psref psref;
 	struct psref psref_ia;
@@ -770,21 +770,21 @@ nd6_na_input(struct mbuf *m, int off, in
 			checklink = true;
 		}
 	} else {
-		int llchange;
+		bool llchange;
 
 		/*
 		 * Check if the link-layer address has changed or not.
 		 */
 		if (lladdr == NULL)
-			llchange = 0;
+			llchange = false;
 		else {
 			if (ln->la_flags & LLE_VALID) {
 if (memcmp(lladdr, >ll_addr, ifp->if_addrlen))
-	llchange = rt_announce = 1;
+	llchange = rt_announce = true;
 else
-	llchange = 0;
+	llchange = false;
 			} else
-llchange = rt_announce = 1;
+llchange = rt_announce = true;
 		}
 
 		/*



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:26:55 UTC 2019

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: change rt_announce and llchange to bool in nd6_na_input()


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/netinet6

2019-08-27 Thread Roy Marples

On 27/08/2019 22:17, Hisashi T Fujinaka wrote:

Is this necessary for -9 too?


Pretty much every BSD with IPv6.

I'll submit a PR for -9 in day or so.
I need to work this and a few other recent changes for -8 and maybe -7 also.

Roy


CVS commit: src/sys/netinet6

2019-08-27 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Aug 27 21:11:26 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c

Log Message:
inet6: nd6_free assumes all routers are processed by kernel RA

This hasn't been the case for a long time if you're a dhcpcd
user with a default config. As such, it's possible for the default
IPv6 router as set by dhcpcd could be erroneously gc'ed by nd6_free.

This reduces the scope of the ND6_WLOCK taken as well as fixing an
issue where we write to ln->ln_state without a lock being held.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/netinet6/nd6.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/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.259 src/sys/netinet6/nd6.c:1.260
--- src/sys/netinet6/nd6.c:1.259	Thu Aug 22 21:22:50 2019
+++ src/sys/netinet6/nd6.c	Tue Aug 27 21:11:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.259 2019/08/22 21:22:50 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.260 2019/08/27 21:11:26 roy Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.259 2019/08/22 21:22:50 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.260 2019/08/27 21:11:26 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1189,7 +1189,6 @@ nd6_is_addr_neighbor(const struct sockad
 static void
 nd6_free(struct llentry *ln, int gc)
 {
-	struct nd_defrouter *dr;
 	struct ifnet *ifp;
 	struct in6_addr *in6;
 	struct sockaddr_in6 sin6;
@@ -1204,81 +1203,70 @@ nd6_free(struct llentry *ln, int gc)
 	 * even though it is not harmful, it was not really necessary.
 	 */
 
-	if (!ip6_forwarding) {
-		ND6_WLOCK();
-		dr = nd6_defrouter_lookup(in6, ifp);
-
-		if (dr != NULL && dr->expire &&
-		ln->ln_state == ND6_LLINFO_STALE && gc) {
+	if (!ip6_forwarding && ln->ln_router) {
+		if (ln->ln_state == ND6_LLINFO_STALE && gc) {
 			/*
 			 * If the reason for the deletion is just garbage
-			 * collection, and the neighbor is an active default
+			 * collection, and the neighbor is an active
 			 * router, do not delete it.  Instead, reset the GC
 			 * timer using the router's lifetime.
-			 * Simply deleting the entry would affect default
+			 * Simply deleting the entry may affect default
 			 * router selection, which is not necessarily a good
 			 * thing, especially when we're using router preference
 			 * values.
 			 * XXX: the check for ln_state would be redundant,
 			 *  but we intentionally keep it just in case.
 			 */
-			if (dr->expire > time_uptime)
+			if (ln->ln_expire > time_uptime)
 nd6_llinfo_settimer(ln,
-(dr->expire - time_uptime) * hz);
+(ln->ln_expire - time_uptime) * hz);
 			else
 nd6_llinfo_settimer(ln, nd6_gctimer * hz);
-			ND6_UNLOCK();
 			LLE_WUNLOCK(ln);
 			return;
 		}
 
-		if (ln->ln_router || dr) {
-			/*
-			 * We need to unlock to avoid a LOR with nd6_rt_flush()
-			 * with the rnh and for the calls to
-			 * nd6_pfxlist_onlink_check() and nd6_defrouter_select() in the
-			 * block further down for calls into nd6_lookup().
-			 * We still hold a ref.
-			 */
-			LLE_WUNLOCK(ln);
-
-			/*
-			 * nd6_rt_flush must be called whether or not the neighbor
-			 * is in the Default Router List.
-			 * See a corresponding comment in nd6_na_input().
-			 */
-			nd6_rt_flush(in6, ifp);
-		}
+		ND6_WLOCK();
 
-		if (dr) {
-			/*
-			 * Unreachablity of a router might affect the default
-			 * router selection and on-link detection of advertised
-			 * prefixes.
-			 */
+		/*
+		 * We need to unlock to avoid a LOR with nd6_rt_flush()
+		 * with the rnh and for the calls to
+		 * nd6_pfxlist_onlink_check() and nd6_defrouter_select() in the
+		 * block further down for calls into nd6_lookup().
+		 * We still hold a ref.
+		 *
+		 * Temporarily fake the state to choose a new default
+		 * router and to perform on-link determination of
+		 * prefixes correctly.
+		 * Below the state will be set correctly,
+		 * or the entry itself will be deleted.
+		 */
+		ln->ln_state = ND6_LLINFO_INCOMPLETE;
+		LLE_WUNLOCK(ln);
 
-			/*
-			 * Temporarily fake the state to choose a new default
-			 * router and to perform on-link determination of
-			 * prefixes correctly.
-			 * Below the state will be set correctly,
-			 * or the entry itself will be deleted.
-			 */
-			ln->ln_state = ND6_LLINFO_INCOMPLETE;
+		/*
+		 * nd6_rt_flush must be called whether or not the neighbor
+		 * is in the Default Router List.
+		 * See a corresponding comment in nd6_na_input().
+		 */
+		nd6_rt_flush(in6, ifp);
 
-			/*
-			 * Since nd6_defrouter_select() does not affect the
-			 * on-link determination and MIP6 needs the check
-			 * before the default router selection, we perform
-			 * the check now.
-			 */
-			n

CVS commit: src/sys/netinet6

2019-08-27 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Aug 27 21:11:26 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c

Log Message:
inet6: nd6_free assumes all routers are processed by kernel RA

This hasn't been the case for a long time if you're a dhcpcd
user with a default config. As such, it's possible for the default
IPv6 router as set by dhcpcd could be erroneously gc'ed by nd6_free.

This reduces the scope of the ND6_WLOCK taken as well as fixing an
issue where we write to ln->ln_state without a lock being held.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/netinet6/nd6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-08-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 22 21:22:50 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c nd6_nbr.c

Log Message:
nd6: notify userland of neighbour lla updates once more

XXX pullup -8 -9


To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.166 -r1.167 src/sys/netinet6/nd6_nbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netinet6

2019-08-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 22 21:22:50 UTC 2019

Modified Files:
src/sys/netinet6: nd6.c nd6_nbr.c

Log Message:
nd6: notify userland of neighbour lla updates once more

XXX pullup -8 -9


To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.166 -r1.167 src/sys/netinet6/nd6_nbr.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/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.258 src/sys/netinet6/nd6.c:1.259
--- src/sys/netinet6/nd6.c:1.258	Thu Aug 22 21:14:46 2019
+++ src/sys/netinet6/nd6.c	Thu Aug 22 21:22:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.258 2019/08/22 21:14:46 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.259 2019/08/22 21:22:50 roy Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.258 2019/08/22 21:14:46 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.259 2019/08/22 21:22:50 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1192,6 +1192,7 @@ nd6_free(struct llentry *ln, int gc)
 	struct nd_defrouter *dr;
 	struct ifnet *ifp;
 	struct in6_addr *in6;
+	struct sockaddr_in6 sin6;
 
 	KASSERT(ln != NULL);
 	LLE_WLOCK_ASSERT(ln);
@@ -1293,6 +1294,10 @@ nd6_free(struct llentry *ln, int gc)
 			LLE_WLOCK(ln);
 	}
 
+	sockaddr_in6_init(, in6, 0, 0, 0);
+	rt_clonedmsg(RTM_DELETE, sin6tosa(),
+	(const uint8_t *)>ll_addr, ifp);
+
 	/*
 	 * Save to unlock. We still hold an extra reference and will not
 	 * free(9) in llentry_free() if someone else holds one as well.
@@ -2225,11 +2230,13 @@ nd6_cache_lladdr(
 		break;
 	}
 
-#if 0
-	/* XXX should we send rtmsg as it used to be? */
-	if (do_update)
-		rt_newmsg(RTM_CHANGE, rt);  /* tell user process */
-#endif
+	if (do_update) {
+		struct sockaddr_in6 sin6;
+
+		sockaddr_in6_init(, from, 0, 0, 0);
+		rt_clonedmsg(is_newentry ? RTM_ADD : RTM_CHANGE,
+		sin6tosa(), lladdr, ifp);
+	}
 
 	if (ln != NULL) {
 		router = ln->ln_router;

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.166 src/sys/netinet6/nd6_nbr.c:1.167
--- src/sys/netinet6/nd6_nbr.c:1.166	Mon Apr 29 16:12:30 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 22 21:22:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.166 2019/04/29 16:12:30 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.167 2019/08/22 21:22:50 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.166 2019/04/29 16:12:30 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.167 2019/08/22 21:22:50 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -883,11 +883,13 @@ nd6_na_input(struct mbuf *m, int off, in
 	 */
 	ln->ln_asked = 0;
 	nd6_llinfo_release_pkts(ln, ifp);
-	/* FIXME */
-#if 0
-	if (rt_announce) /* tell user process about any new lladdr */
-		rt_newmsg(RTM_CHANGE, rt);
-#endif
+
+	if (rt_announce) {
+		struct sockaddr_in6 sin6;
+
+		sockaddr_in6_init(, , 0, 0, 0);
+		rt_clonedmsg(RTM_CHANGE, sin6tosa(), lladdr, ifp);
+	}
 
  freeit:
 	if (ln != NULL)



CVS commit: src/sys

2019-08-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 22 21:14:46 UTC 2019

Modified Files:
src/sys/net: route.h rtsock.c
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6.c

Log Message:
rtsock: rework rt_clonedmsg to take a message type and lladdr

We will use this in a future patch to notify userland of lladdr
changes.

XXX pullup -8 -9


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/net/route.h
cvs rdiff -u -r1.250 -r1.251 src/sys/net/rtsock.c
cvs rdiff -u -r1.283 -r1.284 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.257 -r1.258 src/sys/netinet6/nd6.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/route.h
diff -u src/sys/net/route.h:1.123 src/sys/net/route.h:1.124
--- src/sys/net/route.h:1.123	Mon Apr 29 16:12:30 2019
+++ src/sys/net/route.h	Thu Aug 22 21:14:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.h,v 1.123 2019/04/29 16:12:30 roy Exp $	*/
+/*	$NetBSD: route.h,v 1.124 2019/08/22 21:14:45 roy Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -521,8 +521,8 @@ void	rt_addrmsg_rt(int, struct ifaddr *,
 void	route_enqueue(struct mbuf *, int);
 
 struct llentry;
-void	rt_clonedmsg(const struct sockaddr *, const struct ifnet *,
-	const struct rtentry *);
+void	rt_clonedmsg(int, const struct sockaddr *, const uint8_t *,
+const struct ifnet *);
 
 void	rt_setmetrics(void *, struct rtentry *);
 

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.250 src/sys/net/rtsock.c:1.251
--- src/sys/net/rtsock.c:1.250	Mon May 27 05:33:48 2019
+++ src/sys/net/rtsock.c	Thu Aug 22 21:14:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.250 2019/05/27 05:33:48 ozaki-r Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.251 2019/08/22 21:14:45 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.250 2019/05/27 05:33:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.251 2019/08/22 21:14:45 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -145,14 +145,14 @@ if_addrflags(struct ifaddr *ifa)
  * Send a routing message as mimicing that a cloned route is added.
  */
 void
-rt_clonedmsg(const struct sockaddr *dst, const struct ifnet *ifp,
-const struct rtentry *rt)
+rt_clonedmsg(int type, const struct sockaddr *dst, const uint8_t *lladdr,
+const struct ifnet *ifp)
 {
 	struct rt_addrinfo info;
 	/* Mimic flags exactly */
 #define RTF_LLINFO	0x400
 #define RTF_CLONED	0x2000
-	int flags = RTF_UP | RTF_HOST | RTF_DONE | RTF_LLINFO | RTF_CLONED;
+	int flags = RTF_HOST | RTF_DONE | RTF_LLINFO | RTF_CLONED;
 	union {
 		struct sockaddr sa;
 		struct sockaddr_storage ss;
@@ -161,16 +161,15 @@ rt_clonedmsg(const struct sockaddr *dst,
 	uint8_t namelen = strlen(ifp->if_xname);
 	uint8_t addrlen = ifp->if_addrlen;
 
-	if (rt == NULL)
-		return; /* XXX */
-
+	if (type != RTM_DELETE)
+		flags |= RTF_UP;
 	memset(, 0, sizeof(info));
 	info.rti_info[RTAX_DST] = dst;
 	sockaddr_dl_init(, sizeof(u.ss), ifp->if_index, ifp->if_type,
-	NULL, namelen, NULL, addrlen);
+	NULL, namelen, lladdr, addrlen);
 	info.rti_info[RTAX_GATEWAY] = 
 
-	rt_missmsg(RTM_ADD, , flags, 0);
+	rt_missmsg(type, , flags, 0);
 #undef RTF_LLINFO
 #undef RTF_CLONED
 }

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.283 src/sys/netinet/if_arp.c:1.284
--- src/sys/netinet/if_arp.c:1.283	Mon Aug 19 03:23:30 2019
+++ src/sys/netinet/if_arp.c	Thu Aug 22 21:14:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.283 2019/08/19 03:23:30 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.284 2019/08/22 21:14:46 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.283 2019/08/19 03:23:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.284 2019/08/22 21:14:46 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -751,7 +751,8 @@ notfound:
 
 			arp_init_llentry(ifp, la);
 			sockaddr_in_init(, >r_l3addr.addr4, 0);
-			rt_clonedmsg(sintosa(), ifp, rt);
+			if (rt != NULL)
+rt_clonedmsg(RTM_ADD, sintosa(), NULL, ifp);
 		}
 	} else if (LLE_TRY_UPGRADE(la) == 0) {
 		create_lookup = "lookup";

Index: src/sys/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.257 src/sys/netinet6/nd6.c:1.258
--- src/sys/netinet6/nd6.c:1.257	Wed Aug 14 08:34:44 2019
+++ src/sys/netinet6/nd6.c	Thu Aug 22 21:14:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.257 2019/08/14 08:34:44 ozaki-r Exp $	*/
+/*	$NetBSD: nd6.c,v 1.258 2019/08/22 21:14:46 roy Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.257 2019/08/14 08:34:44 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 

CVS commit: src/sys

2019-08-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 22 21:14:46 UTC 2019

Modified Files:
src/sys/net: route.h rtsock.c
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6.c

Log Message:
rtsock: rework rt_clonedmsg to take a message type and lladdr

We will use this in a future patch to notify userland of lladdr
changes.

XXX pullup -8 -9


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/net/route.h
cvs rdiff -u -r1.250 -r1.251 src/sys/net/rtsock.c
cvs rdiff -u -r1.283 -r1.284 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.257 -r1.258 src/sys/netinet6/nd6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/route

2019-08-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 22 16:10:48 UTC 2019

Modified Files:
src/sbin/route: route.c

Log Message:
route(8): print RTM_CHANGE messages

XXX Pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/route

2019-08-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 22 16:10:48 UTC 2019

Modified Files:
src/sbin/route: route.c

Log Message:
route(8): print RTM_CHANGE messages

XXX Pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.160 src/sbin/route/route.c:1.161
--- src/sbin/route/route.c:1.160	Tue Aug 14 20:53:07 2018
+++ src/sbin/route/route.c	Thu Aug 22 16:10:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.160 2018/08/14 20:53:07 roy Exp $	*/
+/*	$NetBSD: route.c,v 1.161 2019/08/22 16:10:48 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: route.c,v 1.160 2018/08/14 20:53:07 roy Exp $");
+__RCSID("$NetBSD: route.c,v 1.161 2019/08/22 16:10:48 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -1460,6 +1460,7 @@ print_rtmsg(struct rt_msghdr *rtm, int m
 		printf("\n");
 		break;
 	case RTM_ADD:
+	case RTM_CHANGE:
 	case RTM_DELETE:
 	case RTM_GET:
 		(void)printf("pid %d, seq %d, errno %d, flags: ",



CVS commit: src/doc

2019-08-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug 21 17:14:26 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.1643 -r1.1644 src/doc/3RDPARTY
cvs rdiff -u -r1.2572 -r1.2573 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

2019-08-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug 21 17:14:26 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.1643 -r1.1644 src/doc/3RDPARTY
cvs rdiff -u -r1.2572 -r1.2573 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.1643 src/doc/3RDPARTY:1.1644
--- src/doc/3RDPARTY:1.1643	Tue Aug 13 12:38:25 2019
+++ src/doc/3RDPARTY	Wed Aug 21 17:14:26 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1643 2019/08/13 12:38:25 sevan Exp $
+#	$NetBSD: 3RDPARTY,v 1.1644 2019/08/21 17:14:26 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -341,12 +341,12 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	8.0.2
-Current Vers:	8.0.2
+Version:	8.0.3
+Current Vers:	8.0.3
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/
-Date:		2019-07-30
+Date:		2019-08-21
 Mailing List: 	dhcpcd-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2572 src/doc/CHANGES:1.2573
--- src/doc/CHANGES:1.2572	Tue Aug 20 02:42:04 2019
+++ src/doc/CHANGES	Wed Aug 21 17:14:26 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2572 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2573 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -31,3 +31,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		porting to NET_MPSAFE in the process.  [mrg 20190814]
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]
+	dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821]



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-08-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug 21 17:12:19 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcpcd.c if-bsd.c
if-options.c ipv6.h

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/bpf.c
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/ipv6.h

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.11 src/external/bsd/dhcpcd/dist/src/bpf.c:1.12
--- src/external/bsd/dhcpcd/dist/src/bpf.c:1.11	Tue Jul 30 10:25:03 2019
+++ src/external/bsd/dhcpcd/dist/src/bpf.c	Wed Aug 21 17:12:19 2019
@@ -558,6 +558,15 @@ bpf_arp(struct interface *ifp, int fd)
 #define	BPF_M_UDP	3
 #define	BPF_M_UDPLEN	4
 
+#ifdef ARPHRD_NONE
+static const struct bpf_insn bpf_bootp_none[] = {
+	/* Set the frame header length to zero. */
+	BPF_STMT(BPF_LD + BPF_IMM, 0),
+	BPF_STMT(BPF_ST, BPF_M_FHLEN),
+};
+#define BPF_BOOTP_NONE_LEN	__arraycount(bpf_bootp_none)
+#endif
+
 static const struct bpf_insn bpf_bootp_ether[] = {
 	/* Make sure this is an IP packet. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_ABS,
@@ -665,6 +674,12 @@ bpf_bootp(struct interface *ifp, int fd)
 	bp = bpf;
 	/* Check frame header. */
 	switch(ifp->family) {
+#ifdef ARPHRD_NONE
+	case ARPHRD_NONE:
+		memcpy(bp, bpf_bootp_none, sizeof(bpf_bootp_none));
+		bp += BPF_BOOTP_NONE_LEN;
+		break;
+#endif
 	case ARPHRD_ETHER:
 		memcpy(bp, bpf_bootp_ether, sizeof(bpf_bootp_ether));
 		bp += BPF_BOOTP_ETHER_LEN;

Index: src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.23 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.24
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.23	Tue Jul 30 10:25:03 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Wed Aug 21 17:12:19 2019
@@ -1584,24 +1584,24 @@ eexit:
 }
 
 static uint16_t
-checksum(const void *data, size_t len)
+in_cksum(void *data, size_t len, uint32_t *isum)
 {
-	const uint8_t *addr = data;
-	uint32_t sum = 0;
+	const uint16_t *word = data;
+	uint32_t sum = isum != NULL ? *isum : 0;
 
-	while (len > 1) {
-		sum += (uint32_t)(addr[0] * 256 + addr[1]);
-		addr += 2;
-		len -= 2;
-	}
+	for (; len > 1; len -= sizeof(*word))
+		sum += *word++;
 
 	if (len == 1)
-		sum += (uint32_t)(*addr * 256);
+		sum += *(const uint8_t *)word;
+
+	if (isum != NULL)
+		*isum = sum;
 
 	sum = (sum >> 16) + (sum & 0x);
 	sum += (sum >> 16);
 
-	return (uint16_t)~htons((uint16_t)sum);
+	return (uint16_t)~sum;
 }
 
 static struct bootp_pkt *
@@ -1639,14 +1639,16 @@ dhcp_makeudppacket(size_t *sz, const uin
 	udp->uh_dport = htons(BOOTPS);
 	udp->uh_ulen = htons((uint16_t)(sizeof(*udp) + length));
 	ip->ip_len = udp->uh_ulen;
-	udp->uh_sum = checksum(udpp, sizeof(*ip) +  sizeof(*udp) + length);
+	udp->uh_sum = in_cksum(udpp, sizeof(*ip) + sizeof(*udp) + length, NULL);
 
 	ip->ip_v = IPVERSION;
 	ip->ip_hl = sizeof(*ip) >> 2;
 	ip->ip_id = (uint16_t)arc4random_uniform(UINT16_MAX);
 	ip->ip_ttl = IPDEFTTL;
 	ip->ip_len = htons((uint16_t)(sizeof(*ip) + sizeof(*udp) + length));
-	ip->ip_sum = checksum(ip, sizeof(*ip));
+	ip->ip_sum = in_cksum(ip, sizeof(*ip), NULL);
+	if (ip->ip_sum == 0)
+		ip->ip_sum = 0x; /* RFC 768 */
 
 	*sz = sizeof(*ip) + sizeof(*udp) + length;
 	return udpp;
@@ -2363,7 +2365,10 @@ dhcp_arp_address(struct interface *ifp)
 		return 0;
 	}
 #else
-	if (ifp->options->options & DHCPCD_ARP && ia == NULL) {
+	if (!(ifp->flags & IFF_NOARP) &&
+	ifp->options->options & DHCPCD_ARP &&
+	ia == NULL)
+	{
 		struct arp_state *astate;
 		struct dhcp_lease l;
 
@@ -3236,10 +3241,15 @@ valid_udp_packet(void *packet, size_t pl
 	unsigned int flags)
 {
 	struct ip *ip = packet;
-	char ip_hlv = *(char *)ip;
+	struct ip pseudo_ip = {
+		.ip_p = IPPROTO_UDP,
+		.ip_src = ip->ip_src,
+		.ip_dst = ip->ip_dst
+	};
 	size_t ip_hlen;
 	uint16_t ip_len, uh_sum;
 	struct udphdr *udp;
+	uint32_t csum;
 
 	if (plen < sizeof(*ip)) {
 		if (from != NULL)
@@ -3252,13 +3262,13 @@ valid_udp_packet(void *packet, size_t pl
 		from->s_addr = ip->ip_src.s_addr;
 
 	ip_hlen = (size_t)ip->ip_hl * 4;
-	if (checksum(ip, ip_hlen) != 0) {
+	if (in_cksum(ip, ip_hlen, NULL) != 0) {
 		errno = EINVAL;
 		return -1;
 	}
 
-	ip_len = ntohs(ip->ip_len);
 	/* Check we have a payload */
+	ip_len = ntohs(ip->ip_len);
 	if (ip_len <= ip_hlen + sizeof(*udp)) {
 		errno = ERANGE;
 		return -1;
@@ -3272,28 +3282,21 @@ valid_udp_packet(void *

CVS commit: src/external/bsd/dhcpcd/dist/src

2019-08-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug 21 17:12:19 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcpcd.c if-bsd.c
if-options.c ipv6.h

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/bpf.c
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/ipv6.h

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

2019-08-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug 21 17:10:30 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv25438

Log Message:
Import dhcpcd-8.0.3 With the following changes:

 *  DHCP: Work with IP headers with options
 *  script: Assert that env string are correctly terminated
 *  script: Terminate env strings with no value
 *  script: Don't attempt to use an invalid env string
 *  route: Fix NULL deference error when using static routes
 *  ARP: Respect IFF_NOARP
 *  DHCP: Allow full DHCP support for PtP interfaces, but not by default
 *  control: sends correct buffer to listeners

dhcpcd-ui now correctly reports SSD association and all the addresses obtained 
(regression from dhcpcd-7)

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-3

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd

CVS import: src/external/bsd/dhcpcd/dist

2019-08-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug 21 17:10:30 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv25438

Log Message:
Import dhcpcd-8.0.3 With the following changes:

 *  DHCP: Work with IP headers with options
 *  script: Assert that env string are correctly terminated
 *  script: Terminate env strings with no value
 *  script: Don't attempt to use an invalid env string
 *  route: Fix NULL deference error when using static routes
 *  ARP: Respect IFF_NOARP
 *  DHCP: Allow full DHCP support for PtP interfaces, but not by default
 *  control: sends correct buffer to listeners

dhcpcd-ui now correctly reports SSD association and all the addresses obtained 
(regression from dhcpcd-7)

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-3

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd

CVS commit: src/sys/net

2019-08-20 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Aug 20 10:59:00 UTC 2019

Modified Files:
src/sys/net: if.c

Log Message:
if: announce flag changes other than up or down

For example toggling promiscuous mode or disabling ARP.

XXX Pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.458 -r1.459 src/sys/net/if.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

2019-08-20 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Aug 20 10:59:00 UTC 2019

Modified Files:
src/sys/net: if.c

Log Message:
if: announce flag changes other than up or down

For example toggling promiscuous mode or disabling ARP.

XXX Pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.458 -r1.459 src/sys/net/if.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.c
diff -u src/sys/net/if.c:1.458 src/sys/net/if.c:1.459
--- src/sys/net/if.c:1.458	Thu Aug 15 04:20:59 2019
+++ src/sys/net/if.c	Tue Aug 20 10:59:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.458 2019/08/15 04:20:59 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.459 2019/08/20 10:59:00 roy Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.458 2019/08/15 04:20:59 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.459 2019/08/20 10:59:00 roy Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -2914,6 +2914,7 @@ ifioctl_common(struct ifnet *ifp, u_long
 	struct ifreq *ifr;
 	struct ifcapreq *ifcr;
 	struct ifdatareq *ifdr;
+	unsigned short flags;
 
 	switch (cmd) {
 	case SIOCSIFCAP:
@@ -2985,8 +2986,13 @@ ifioctl_common(struct ifnet *ifp, u_long
 			splx(s);
 		}
 		KERNEL_UNLOCK_IF_IFP_MPSAFE(ifp);
-		ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) |
-			(ifr->ifr_flags &~ IFF_CANTCHANGE);
+		flags = (ifp->if_flags & IFF_CANTCHANGE) |
+		(ifr->ifr_flags &~ IFF_CANTCHANGE);
+		if (ifp->if_flags != flags) {
+			ifp->if_flags = flags;
+			/* Notify that the flags have changed. */
+			rt_ifmsg(ifp);
+		}
 		break;
 	case SIOCGIFFLAGS:
 		ifr = data;



CVS commit: src/sbin/reboot

2019-08-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug  8 21:14:12 UTC 2019

Modified Files:
src/sbin/reboot: reboot.c

Log Message:
reboot: fix arg order for logwtmpx(3)

Matches the correct order from init(1).

Thanks to Sascha Wildner 


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sbin/reboot/reboot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/reboot/reboot.c
diff -u src/sbin/reboot/reboot.c:1.40 src/sbin/reboot/reboot.c:1.41
--- src/sbin/reboot/reboot.c:1.40	Sun Nov  4 22:28:16 2012
+++ src/sbin/reboot/reboot.c	Thu Aug  8 21:14:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: reboot.c,v 1.40 2012/11/04 22:28:16 christos Exp $	*/
+/*	$NetBSD: reboot.c,v 1.41 2019/08/08 21:14:12 roy Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)reboot.c	8.1 (Berkeley) 6/5/93";
 #else
-__RCSID("$NetBSD: reboot.c,v 1.40 2012/11/04 22:28:16 christos Exp $");
+__RCSID("$NetBSD: reboot.c,v 1.41 2019/08/08 21:14:12 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
 	logwtmp("~", "shutdown", "");
 #endif
 #ifdef SUPPORT_UTMPX
-	logwtmpx("~", "shutdown", "", INIT_PROCESS, 0);
+	logwtmpx("~", "shutdown", "", 0, INIT_PROCESS);
 #endif
 
 	/*



CVS commit: src/sbin/reboot

2019-08-08 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug  8 21:14:12 UTC 2019

Modified Files:
src/sbin/reboot: reboot.c

Log Message:
reboot: fix arg order for logwtmpx(3)

Matches the correct order from init(1).

Thanks to Sascha Wildner 


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sbin/reboot/reboot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/sys

2019-08-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug  7 01:09:49 UTC 2019

Modified Files:
src/lib/libc/sys: read.2

Log Message:
read(2): Document ENOBUFS


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libc/sys/read.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/sys

2019-08-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Aug  7 01:09:49 UTC 2019

Modified Files:
src/lib/libc/sys: read.2

Log Message:
read(2): Document ENOBUFS


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libc/sys/read.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/read.2
diff -u src/lib/libc/sys/read.2:1.36 src/lib/libc/sys/read.2:1.37
--- src/lib/libc/sys/read.2:1.36	Mon Jul  3 21:32:50 2017
+++ src/lib/libc/sys/read.2	Wed Aug  7 01:09:49 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: read.2,v 1.36 2017/07/03 21:32:50 wiz Exp $
+.\"	$NetBSD: read.2,v 1.37 2019/08/07 01:09:49 roy Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)read.2	8.4 (Berkeley) 2/26/94
 .\"
-.Dd December 12, 2011
+.Dd August 07, 2019
 .Dt READ 2
 .Os
 .Sh NAME
@@ -171,6 +171,8 @@ or
 The
 .Fn readdir
 function should be used instead.
+.It Bq Er ENOBUFS
+A message was not delivered because it would have overflowed the buffer.
 .El
 .Pp
 In addition,



CVS commit: src/doc

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:28:29 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.2


To generate a diff of this commit:
cvs rdiff -u -r1.1638 -r1.1639 src/doc/3RDPARTY
cvs rdiff -u -r1.2561 -r1.2562 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

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:28:29 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.2


To generate a diff of this commit:
cvs rdiff -u -r1.1638 -r1.1639 src/doc/3RDPARTY
cvs rdiff -u -r1.2561 -r1.2562 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.1638 src/doc/3RDPARTY:1.1639
--- src/doc/3RDPARTY:1.1638	Thu Jul 25 08:59:32 2019
+++ src/doc/3RDPARTY	Tue Jul 30 10:28:28 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1638 2019/07/25 08:59:32 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1639 2019/07/30 10:28:28 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -341,12 +341,12 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	8.0.1
-Current Vers:	8.0.1
+Version:	8.0.2
+Current Vers:	8.0.2
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/
-Date:		2019-07-25
+Date:		2019-07-30
 Mailing List: 	dhcpcd-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2561 src/doc/CHANGES:1.2562
--- src/doc/CHANGES:1.2561	Fri Jul 26 23:59:42 2019
+++ src/doc/CHANGES	Tue Jul 30 10:28:28 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2561 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2562 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -415,3 +415,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	tar(1): MKBSDTAR now defaults to yes. [roy 20190724]
 	dhcpcd(8): Import dhcpcd-8.0.1. [roy 20190725]
 	mac68k: Add genfb(4) framebuffer driver. [rin 20190726]
+	dhcpcd(8): Import dhcpcd-8.0.2. [roy 20190730]



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:25:03 UTC 2019

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

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/bpf.c \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/if-bsd.c \
src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/ipv6.c \
src/external/bsd/dhcpcd/dist/src/ipv6.h

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

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:25:03 UTC 2019

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

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/bpf.c \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/if-bsd.c \
src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/ipv6.c \
src/external/bsd/dhcpcd/dist/src/ipv6.h

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.10 src/external/bsd/dhcpcd/dist/src/bpf.c:1.11
--- src/external/bsd/dhcpcd/dist/src/bpf.c:1.10	Wed Jul 24 09:57:43 2019
+++ src/external/bsd/dhcpcd/dist/src/bpf.c	Tue Jul 30 10:25:03 2019
@@ -93,7 +93,7 @@ bpf_frame_header_len(const struct interf
 	}
 }
 
-static const uint8_t etherbroadcastaddr[] =
+static const uint8_t etherbcastaddr[] =
 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 int
@@ -104,7 +104,7 @@ bpf_frame_bcast(const struct interface *
 	case ARPHRD_ETHER:
 		return memcmp(frame +
 		offsetof(struct ether_header, ether_dhost),
-		etherbroadcastaddr, sizeof(etherbroadcastaddr));
+		etherbcastaddr, sizeof(etherbcastaddr));
 	default:
 		return -1;
 	}
@@ -552,6 +552,12 @@ bpf_arp(struct interface *ifp, int fd)
 }
 #endif
 
+#define	BPF_M_FHLEN	0
+#define	BPF_M_IPHLEN	1
+#define	BPF_M_IPLEN	2
+#define	BPF_M_UDP	3
+#define	BPF_M_UDPLEN	4
+
 static const struct bpf_insn bpf_bootp_ether[] = {
 	/* Make sure this is an IP packet. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_ABS,
@@ -561,16 +567,26 @@ static const struct bpf_insn bpf_bootp_e
 
 	/* Load frame header length into X. */
 	BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)),
-	/* Copy to M0. */
-	BPF_STMT(BPF_STX, 0),
+	/* Copy frame header length to memory */
+	BPF_STMT(BPF_STX, BPF_M_FHLEN),
 };
 #define BPF_BOOTP_ETHER_LEN	__arraycount(bpf_bootp_ether)
 
 static const struct bpf_insn bpf_bootp_filter[] = {
-	/* Make sure it's an optionless IPv4 packet. */
+	/* Make sure it's an IPv4 packet. */
+	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
+	BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0xf0),
+	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x40, 1, 0),
+	BPF_STMT(BPF_RET + BPF_K, 0),
+
+	/* Ensure IP header length is big enough and
+	 * store the IP header length in memory. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
-	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x45, 1, 0),
+	BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x0f),
+	BPF_STMT(BPF_ALU + BPF_MUL + BPF_K, 4),
+	BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ip), 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
+	BPF_STMT(BPF_ST, BPF_M_IPHLEN),
 
 	/* Make sure it's a UDP packet. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct ip, ip_p)),
@@ -582,39 +598,42 @@ static const struct bpf_insn bpf_bootp_f
 	BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 0, 1),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Store IP location in M1. */
+	/* Store IP length. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_len)),
-	BPF_STMT(BPF_ST, 1),
-
-	/* Store IP length in M2. */
-	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_len)),
-	BPF_STMT(BPF_ST, 2),
+	BPF_STMT(BPF_ST, BPF_M_IPLEN),
 
 	/* Advance to the UDP header. */
-	BPF_STMT(BPF_MISC + BPF_TXA, 0),
-	BPF_STMT(BPF_ALU + BPF_ADD + BPF_K, sizeof(struct ip)),
+	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_IPHLEN),
+	BPF_STMT(BPF_ALU + BPF_ADD + BPF_X, 0),
 	BPF_STMT(BPF_MISC + BPF_TAX, 0),
 
-	/* Store X in M3. */
-	BPF_STMT(BPF_STX, 3),
+	/* Store UDP location */
+	BPF_STMT(BPF_STX, BPF_M_UDP),
 
 	/* 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),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Store UDP length in X. */
+	/* Store UDP length. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct udphdr, uh_ulen)),
+	BPF_STMT(BPF_ST, BPF_M_UDPLEN),
+
+	/* Ensure that UDP length + IP header length == IP length */
+	/* Copy IP header length to X. */
+	BPF_STMT(BPF_LDX + BPF_MEM, BPF_M_IPHLEN),
+	/* Add UDP length (A) to IP header length (X). */
+	BPF_STMT(BPF_ALU + BPF_ADD + BPF_X, 0),
+	/* Store result in X. */
 	BPF_STMT(BPF_MISC + BPF_TAX, 0),
-	/* Copy IP length in M2 to A. */
-	BPF_STMT(BPF_LD + BPF_MEM, 2),
-	/* Ensure IP length - IP header size == UDP length. */
-	BPF_STMT(BPF_ALU + BPF_SUB + BPF_K, sizeof(struct ip)),
+	/* Copy IP length to A. */
+	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_IPLEN),
+	/* Ensure X == A. */
 	BPF_JUMP(B

CVS import: src/external/bsd/dhcpcd/dist

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:23:10 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13305

Log Message:
Import dhcpcd-8.0.2 with the following changes:

  *  NetBSD: Can be build without ARP support but listen to kernel DaD
  *  ND6: Removed NA support from SMALL builds
  *  DHCP: Avoid duplicate read of UDP socket when BPF is also open
  *  IP: Avoid adding address if already exists on OS other than Linux
  *  route: Fixed a NULL de-reference error on static routes
  *  DHCP6: Move to REQUEST if any IA has no-binding in REWNEW/REBIND
  *  IP: Accept packets with IP header options 

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-2

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src

CVS import: src/external/bsd/dhcpcd/dist

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:23:10 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13305

Log Message:
Import dhcpcd-8.0.2 with the following changes:

  *  NetBSD: Can be build without ARP support but listen to kernel DaD
  *  ND6: Removed NA support from SMALL builds
  *  DHCP: Avoid duplicate read of UDP socket when BPF is also open
  *  IP: Avoid adding address if already exists on OS other than Linux
  *  route: Fixed a NULL de-reference error on static routes
  *  DHCP6: Move to REQUEST if any IA has no-binding in REWNEW/REBIND
  *  IP: Accept packets with IP header options 

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-2

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src

CVS commit: src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 13:29:36 UTC 2019

Modified Files:
src/distrib/sets/lists/misc: mi
src/external/bsd/dhcpcd/examples/hooks: Makefile

Log Message:
leot wants the ability to start wpa_supplicant from dhcpcd
without having to start wpa_supplicant seperately, thus the example
hook is restored.


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/distrib/sets/lists/misc/mi
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/examples/hooks/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/misc/mi
diff -u src/distrib/sets/lists/misc/mi:1.214 src/distrib/sets/lists/misc/mi:1.215
--- src/distrib/sets/lists/misc/mi:1.214	Fri Jul 26 10:42:41 2019
+++ src/distrib/sets/lists/misc/mi	Fri Jul 26 13:29:36 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.214 2019/07/26 10:42:41 wiz Exp $
+# $NetBSD: mi,v 1.215 2019/07/26 13:29:36 roy Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1363,7 +1363,7 @@
 ./usr/share/examples/atf/tests-results.css	misc-atf-examples	share,atf,!kyua
 ./usr/share/examples/atf/tests-results.css	misc-obsolete		share,kyua,obsolete
 ./usr/share/examples/dhcp/dhcpd.conf		misc-dhcpd-examples	share
-./usr/share/examples/dhcpcd/hooks/10-wpa_supplicant	misc-obsolete	obsolete
+./usr/share/examples/dhcpcd/hooks/10-wpa_supplicant	misc-dhcpcd-examples	share
 ./usr/share/examples/dhcpcd/hooks/15-timezone	misc-dhcpcd-examples	share
 ./usr/share/examples/dhcpcd/hooks/29-lookup-hostname	misc-dhcpcd-examples	share
 ./usr/share/examples/dhcpcd/hooks/50-ypbind	misc-dhcpcd-examples	share,yp

Index: src/external/bsd/dhcpcd/examples/hooks/Makefile
diff -u src/external/bsd/dhcpcd/examples/hooks/Makefile:1.2 src/external/bsd/dhcpcd/examples/hooks/Makefile:1.3
--- src/external/bsd/dhcpcd/examples/hooks/Makefile:1.2	Fri Jul 26 10:34:26 2019
+++ src/external/bsd/dhcpcd/examples/hooks/Makefile	Fri Jul 26 13:29:36 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2019/07/26 10:34:26 roy Exp $
+# $NetBSD: Makefile,v 1.3 2019/07/26 13:29:36 roy Exp $
 #
 
 .include 
@@ -7,7 +7,7 @@
 .PATH:			${DIST}/hooks
 
 .if ${MKSHARE} != "no"
-FILES=			15-timezone 29-lookup-hostname
+FILES=			10-wpa_supplicant 15-timezone 29-lookup-hostname
 
 .if ${MKYP} != "no"
 FILESBUILD_50-ypbind=	YES



CVS commit: src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 13:29:36 UTC 2019

Modified Files:
src/distrib/sets/lists/misc: mi
src/external/bsd/dhcpcd/examples/hooks: Makefile

Log Message:
leot wants the ability to start wpa_supplicant from dhcpcd
without having to start wpa_supplicant seperately, thus the example
hook is restored.


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/distrib/sets/lists/misc/mi
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/examples/hooks/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/dist/src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:53:45 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp6.c ipv6.c ipv6.h ipv6nd.c

Log Message:
As dhcpcd no longer supports IPv4 address advertisement for SMALL builds,
remove the equivalent IPv6 functionality.
This shouldn't be an issue as this is only used for IPv6 address sharing,
which only the NetBSD kernel currently supports.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.1.1.17 -r1.2 src/external/bsd/dhcpcd/dist/src/ipv6.c
cvs rdiff -u -r1.1.1.11 -r1.2 src/external/bsd/dhcpcd/dist/src/ipv6.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcpcd/dist/src/ipv6nd.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

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:53:45 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp6.c ipv6.c ipv6.h ipv6nd.c

Log Message:
As dhcpcd no longer supports IPv4 address advertisement for SMALL builds,
remove the equivalent IPv6 functionality.
This shouldn't be an issue as this is only used for IPv6 address sharing,
which only the NetBSD kernel currently supports.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.1.1.17 -r1.2 src/external/bsd/dhcpcd/dist/src/ipv6.c
cvs rdiff -u -r1.1.1.11 -r1.2 src/external/bsd/dhcpcd/dist/src/ipv6.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcpcd/dist/src/ipv6nd.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.9 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.10
--- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.9	Wed Jul 24 09:57:43 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcp6.c	Fri Jul 26 10:53:45 2019
@@ -1523,7 +1523,9 @@ dhcp6_dadcallback(void *arg)
 if (valid)
 	dhcpcd_daemonise(ifp->ctx);
 			}
+#ifdef ND6_ADVERTISE
 			ipv6nd_advertise(ia);
+#endif
 		}
 	}
 }
@@ -3927,16 +3929,20 @@ dhcp6_free(struct interface *ifp)
 void
 dhcp6_abort(struct interface *ifp)
 {
+#ifdef ND6_ADVERTISE
 	struct dhcp6_state *state;
 	struct ipv6_addr *ia;
+#endif
 
 	eloop_timeout_delete(ifp->ctx->eloop, dhcp6_start1, ifp);
+#ifdef ND6_ADVERTISE
 	state = D6_STATE(ifp);
 	if (state == NULL)
 		return;
 	TAILQ_FOREACH(ia, >addrs, next) {
 		ipv6nd_advertise(ia);
 	}
+#endif
 }
 
 void

Index: src/external/bsd/dhcpcd/dist/src/ipv6.c
diff -u src/external/bsd/dhcpcd/dist/src/ipv6.c:1.1.1.17 src/external/bsd/dhcpcd/dist/src/ipv6.c:1.2
--- src/external/bsd/dhcpcd/dist/src/ipv6.c:1.1.1.17	Wed Jul 24 09:54:54 2019
+++ src/external/bsd/dhcpcd/dist/src/ipv6.c	Fri Jul 26 10:53:45 2019
@@ -616,8 +616,10 @@ ipv6_deleteaddr(struct ipv6_addr *ia)
 		}
 	}
 
+#ifdef ND6_ADVERTISE
 	/* Advertise the address if it exists on another interface. */
 	ipv6nd_advertise(ia);
+#endif
 }
 
 static int
@@ -625,8 +627,10 @@ ipv6_addaddr1(struct ipv6_addr *ia, cons
 {
 	struct interface *ifp;
 	uint32_t pltime, vltime;
-	bool vltime_was_zero;
 	__printflike(1, 2) void (*logfunc)(const char *, ...);
+#ifdef ND6_ADVERTISE
+	bool vltime_was_zero;
+#endif
 #ifdef __sun
 	struct ipv6_state *state;
 	struct ipv6_addr *ia2;
@@ -694,7 +698,9 @@ ipv6_addaddr1(struct ipv6_addr *ia, cons
 		" seconds",
 		ifp->name, ia->prefix_pltime, ia->prefix_vltime);
 
+#ifdef ND6_ADVERTISE
 	vltime_was_zero = ia->prefix_vltime == 0;
+#endif
 	if (if_address6(RTM_NEWADDR, ia) == -1) {
 		logerr(__func__);
 		/* Restore real pltime and vltime */
@@ -758,9 +764,11 @@ ipv6_addaddr1(struct ipv6_addr *ia, cons
 	}
 #endif
 
+#ifdef ND6_ADVERTISE
 	/* Re-advertise the preferred address to be safe. */
 	if (!vltime_was_zero)
 		ipv6nd_advertise(ia);
+#endif
 
 	return 0;
 }
@@ -1081,9 +1089,11 @@ ipv6_handleifa(struct dhcpcd_ctx *ctx,
 	case RTM_DELADDR:
 		if (ia != NULL) {
 			TAILQ_REMOVE(>addrs, ia, next);
+#ifdef ND6_ADVERTISE
 			/* Advertise the address if it exists on
 			 * another interface. */
 			ipv6nd_advertise(ia);
+#endif
 			/* We'll free it at the end of the function. */
 		}
 		break;

Index: src/external/bsd/dhcpcd/dist/src/ipv6.h
diff -u src/external/bsd/dhcpcd/dist/src/ipv6.h:1.1.1.11 src/external/bsd/dhcpcd/dist/src/ipv6.h:1.2
--- src/external/bsd/dhcpcd/dist/src/ipv6.h:1.1.1.11	Wed Jul 24 09:54:54 2019
+++ src/external/bsd/dhcpcd/dist/src/ipv6.h	Fri Jul 26 10:53:45 2019
@@ -149,6 +149,10 @@
 #  define IN6_IFF_DETACHED	0
 #endif
 
+#ifndef SMALL
+#  define ND6_ADVERTISE
+#endif
+
 #ifdef INET6
 TAILQ_HEAD(ipv6_addrhead, ipv6_addr);
 struct ipv6_addr {

Index: src/external/bsd/dhcpcd/dist/src/ipv6nd.c
diff -u src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.8 src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.9
--- src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.8	Wed Jul 24 09:57:43 2019
+++ src/external/bsd/dhcpcd/dist/src/ipv6nd.c	Fri Jul 26 10:53:45 2019
@@ -389,6 +389,7 @@ ipv6nd_sendrsprobe(void *arg)
 	}
 }
 
+#ifdef ND6_ADVERTISE
 static void
 ipv6nd_sendadvertisement(void *arg)
 {
@@ -526,6 +527,7 @@ ipv6nd_advertise(struct ipv6_addr *ia)
 	eloop_timeout_delete(ctx->eloop, ipv6nd_sendadvertisement, iaf);
 	ipv6nd_sendadvertisement(iaf);
 }
+#endif /* ND6_ADVERTISE */
 
 static void
 ipv6nd_expire(void *arg)
@@ -908,7 +910,9 @@ try_script:
 	return;
 			}
 		}
+#ifdef ND6_ADVERTISE
 		ipv6nd_advertise(ia);
+#endif
 	}
 }
 



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:49:06 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Build dhcpcd without ARP support for SMALL builds.
The only functionality lost on modern NetBSD is the ability to
announce the preferred address for address sharing.
This shouldn't be an issue for installations.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 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/sbin/dhcpcd

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:49:06 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Build dhcpcd without ARP support for SMALL builds.
The only functionality lost on modern NetBSD is the ability to
announce the preferred address for address sharing.
This shouldn't be an issue for installations.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 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/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.47 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.48
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.47	Thu Jul 25 08:58:32 2019
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Fri Jul 26 10:49:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2019/07/25 08:58:32 roy Exp $
+# $NetBSD: Makefile,v 1.48 2019/07/26 10:49:06 roy Exp $
 #
 
 WARNS?=		6
@@ -30,10 +30,13 @@ SRCS+=		auth.c
 .endif
 
 .if (${USE_INET} != "no")
-CPPFLAGS+=	-DARP -DINET
-SRCS+=		arp.c bpf.c dhcp.c ipv4.c
+CPPFLAGS+=	-DINET
+SRCS+=		bpf.c dhcp.c ipv4.c
 .if !defined(SMALLPROG)
-CPPFLAGS+=	-DIPV4LL -DARPING
+CPPFLAGS+=	-DARP
+SRCS+=		arp.c
+CPPFLAGS+=	-DARPING
+CPPFLAGS+=	-DIPV4LL
 SRCS+=		ipv4ll.c
 .endif
 .endif



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:47:29 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c

Log Message:
Allow dhcpcd to be built without ARP support for SMALL builds.
This is fine because the kernel supports RFC 5227 which dhcpcd uses
instead to detect and act on address duplication.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/src/dhcp.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

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:47:29 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c

Log Message:
Allow dhcpcd to be built without ARP support for SMALL builds.
This is fine because the kernel supports RFC 5227 which dhcpcd uses
instead to detect and act on address duplication.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/src/dhcp.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.21 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.22
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.21	Thu Jul 25 08:55:18 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Fri Jul 26 10:47:29 2019
@@ -2329,7 +2329,9 @@ dhcp_arp_new(struct interface *ifp, stru
 	return astate;
 }
 #endif
+#endif /* ARP */
 
+#if defined(ARP) || defined(KERNEL_RFC5227)
 static int
 dhcp_arp_address(struct interface *ifp)
 {
@@ -2417,7 +2419,7 @@ dhcp_static(struct interface *ifp)
 	ia ? >addr : >req_addr,
 	ia ? >mask : >req_mask);
 	if (state->offer_len)
-#ifdef ARP
+#if defined(ARP) || defined(KERNEL_RFC5227)
 		dhcp_arp_bind(ifp);
 #else
 		dhcp_bind(ifp);
@@ -3210,7 +3212,7 @@ rapidcommit:
 	lease->frominfo = 0;
 	eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
 
-#ifdef ARP
+#if defined(ARP) || defined(KERNEL_RFC5227)
 	dhcp_arp_bind(ifp);
 #else
 	dhcp_bind(ifp);



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:39:29 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcpcd.8.in

Log Message:
Replace hook example 10-wpa_supplicant with 29-lookup-hostname.
Fixes PR install/54351.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.13 -r1.2 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.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/dhcpcd/dist/src/dhcpcd.8.in
diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in:1.1.1.13 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in:1.2
--- src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in:1.1.1.13	Wed Jul 24 09:54:51 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in	Fri Jul 26 10:39:29 2019
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 23, 2019
+.Dd July 25, 2019
 .Dt DHCPCD 8
 .Os
 .Sh NAME
@@ -234,12 +234,11 @@ and need to be copied to
 .Pa @HOOKDIR@
 if you intend to use them.
 For example, you could install
-.Pa 10-wpa_supplicant
+.Pa 29-lookup-hostname
 so that
 .Nm
-can ensure that
-.Xr wpa_supplicant 8
-is always running on a hot-plugged wireless interface.
+can lookup the hostname of the IP address in DNS if no hostname
+is given by the lease and one is not already set.
 .Ss Fine tuning
 You can fine-tune the behaviour of
 .Nm
@@ -404,10 +403,6 @@ is specified then this applies to all in
 If
 .Nm
 is not running, then it starts up as normal.
-This may also cause
-.Xr wpa_supplicant 8
-to reload its configuration for each interface as well if the
-relevant hook script has been installed.
 .It Fl N , Fl Fl renew Op Ar interface
 Notifies
 .Nm



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:39:29 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcpcd.8.in

Log Message:
Replace hook example 10-wpa_supplicant with 29-lookup-hostname.
Fixes PR install/54351.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.13 -r1.2 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:34:26 UTC 2019

Modified Files:
src/distrib/sets/lists/misc: mi
src/external/bsd/dhcpcd/examples/hooks: Makefile

Log Message:
Stop installing 10-wpa_supplicant.
Only install 50-ypbind when MKYP=yes.

Partially addresses PR install/54351.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/distrib/sets/lists/misc/mi
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcpcd/examples/hooks/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-07-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jul 26 10:34:26 UTC 2019

Modified Files:
src/distrib/sets/lists/misc: mi
src/external/bsd/dhcpcd/examples/hooks: Makefile

Log Message:
Stop installing 10-wpa_supplicant.
Only install 50-ypbind when MKYP=yes.

Partially addresses PR install/54351.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/distrib/sets/lists/misc/mi
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcpcd/examples/hooks/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/misc/mi
diff -u src/distrib/sets/lists/misc/mi:1.212 src/distrib/sets/lists/misc/mi:1.213
--- src/distrib/sets/lists/misc/mi:1.212	Sat May  4 17:03:39 2019
+++ src/distrib/sets/lists/misc/mi	Fri Jul 26 10:34:26 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.212 2019/05/04 17:03:39 sevan Exp $
+# $NetBSD: mi,v 1.213 2019/07/26 10:34:26 roy Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1363,10 +1363,10 @@
 ./usr/share/examples/atf/tests-results.css	misc-atf-examples	share,atf,!kyua
 ./usr/share/examples/atf/tests-results.css	misc-obsolete		share,kyua,obsolete
 ./usr/share/examples/dhcp/dhcpd.conf		misc-dhcpd-examples	share
-./usr/share/examples/dhcpcd/hooks/10-wpa_supplicant	misc-dhcpcd-examples	share
+./usr/share/examples/dhcpcd/hooks/10-wpa_supplicant	misc-dhcpcd-examples	obsolete
 ./usr/share/examples/dhcpcd/hooks/15-timezone	misc-dhcpcd-examples	share
 ./usr/share/examples/dhcpcd/hooks/29-lookup-hostname	misc-dhcpcd-examples	share
-./usr/share/examples/dhcpcd/hooks/50-ypbind	misc-dhcpcd-examples	share
+./usr/share/examples/dhcpcd/hooks/50-ypbind	misc-dhcpcd-examples	share,yp
 ./usr/share/examples/disktab/disktab		misc-sys-examples	share
 ./usr/share/examples/emul/linux/etc/LINUX_MAKEDEV	misc-sys-examples	share
 ./usr/share/examples/emul/svr4/etc/SVR4_MAKEDEV	misc-obsolete		obsolete

Index: src/external/bsd/dhcpcd/examples/hooks/Makefile
diff -u src/external/bsd/dhcpcd/examples/hooks/Makefile:1.1 src/external/bsd/dhcpcd/examples/hooks/Makefile:1.2
--- src/external/bsd/dhcpcd/examples/hooks/Makefile:1.1	Sun Apr  2 20:18:37 2017
+++ src/external/bsd/dhcpcd/examples/hooks/Makefile	Fri Jul 26 10:34:26 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2017/04/02 20:18:37 roy Exp $
+# $NetBSD: Makefile,v 1.2 2019/07/26 10:34:26 roy Exp $
 #
 
 .include 
@@ -7,11 +7,13 @@
 .PATH:			${DIST}/hooks
 
 .if ${MKSHARE} != "no"
-FILES=			10-wpa_supplicant 15-timezone 29-lookup-hostname
-FILES+=			50-ypbind
+FILES=			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
 



CVS commit: src/doc

2019-07-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jul 25 08:59:32 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.1


To generate a diff of this commit:
cvs rdiff -u -r1.1637 -r1.1638 src/doc/3RDPARTY
cvs rdiff -u -r1.2557 -r1.2558 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

2019-07-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jul 25 08:59:32 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.1


To generate a diff of this commit:
cvs rdiff -u -r1.1637 -r1.1638 src/doc/3RDPARTY
cvs rdiff -u -r1.2557 -r1.2558 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.1637 src/doc/3RDPARTY:1.1638
--- src/doc/3RDPARTY:1.1637	Wed Jul 24 10:00:50 2019
+++ src/doc/3RDPARTY	Thu Jul 25 08:59:32 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1637 2019/07/24 10:00:50 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1638 2019/07/25 08:59:32 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -341,12 +341,12 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	8.0.0
-Current Vers:	8.0.0
+Version:	8.0.1
+Current Vers:	8.0.1
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/
-Date:		2019-07-24
+Date:		2019-07-25
 Mailing List: 	dhcpcd-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2557 src/doc/CHANGES:1.2558
--- src/doc/CHANGES:1.2557	Wed Jul 24 10:05:57 2019
+++ src/doc/CHANGES	Thu Jul 25 08:59:32 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2557 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2558 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -408,3 +408,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		[rin 20190723]
 	dhcpcd(8): Import dhcpcd-8.0.0 [roy 20190724]
 	tar(1): MKBSDTAR now defaults to yes [roy 20190724]
+	dhcpcd(8): Import dhcpcd-8.0.1 [roy 20190725]



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2019-07-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jul 25 08:58:33 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Revert prior as dhcpcd-8.0.1 now builds small without IPv4LL again.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 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/sbin/dhcpcd

2019-07-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jul 25 08:58:33 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Revert prior as dhcpcd-8.0.1 now builds small without IPv4LL again.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 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/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.46 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.47
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.46	Wed Jul 24 21:19:05 2019
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Thu Jul 25 08:58:32 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2019/07/24 21:19:05 roy Exp $
+# $NetBSD: Makefile,v 1.47 2019/07/25 08:58:32 roy Exp $
 #
 
 WARNS?=		6
@@ -32,10 +32,10 @@ SRCS+=		auth.c
 .if (${USE_INET} != "no")
 CPPFLAGS+=	-DARP -DINET
 SRCS+=		arp.c bpf.c dhcp.c ipv4.c
-#.if !defined(SMALLPROG)
+.if !defined(SMALLPROG)
 CPPFLAGS+=	-DIPV4LL -DARPING
 SRCS+=		ipv4ll.c
-#.endif
+.endif
 .endif
 
 .if (${USE_INET6} != "no")



CVS import: src/external/bsd/dhcpcd/dist

2019-07-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jul 25 08:54:01 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv20781

Log Message:
Import dhcpcd-8.0.1 with the following changes:

  *  Compile fixes for various build options on various platforms
  *  IPv4LL is fixed on NetBSD-8
  *  Script buffers are freed on forking

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-1

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
U src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src/external/bsd/dhcpcd/dist/src/if-linux.c
U src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/if-sun.c
U src/external/bsd/dhcpcd/dist/src/if.c
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/ipv4.c

CVS import: src/external/bsd/dhcpcd/dist

2019-07-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jul 25 08:54:01 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv20781

Log Message:
Import dhcpcd-8.0.1 with the following changes:

  *  Compile fixes for various build options on various platforms
  *  IPv4LL is fixed on NetBSD-8
  *  Script buffers are freed on forking

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-1

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
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/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
U src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src/external/bsd/dhcpcd/dist/src/if-linux.c
U src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/if-sun.c
U src/external/bsd/dhcpcd/dist/src/if.c
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/ipv4.c

CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2019-07-24 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jul 24 21:19:05 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Temporarily turn on IPV4LL for SMALL builds to work around a compile issue.
This will be fixed in the next import.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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/sbin/dhcpcd

2019-07-24 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jul 24 21:19:05 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Temporarily turn on IPV4LL for SMALL builds to work around a compile issue.
This will be fixed in the next import.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.45 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.46
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.45	Thu Feb  7 21:38:53 2019
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Wed Jul 24 21:19:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2019/02/07 21:38:53 roy Exp $
+# $NetBSD: Makefile,v 1.46 2019/07/24 21:19:05 roy Exp $
 #
 
 WARNS?=		6
@@ -32,10 +32,10 @@ SRCS+=		auth.c
 .if (${USE_INET} != "no")
 CPPFLAGS+=	-DARP -DINET
 SRCS+=		arp.c bpf.c dhcp.c ipv4.c
-.if !defined(SMALLPROG)
+#.if !defined(SMALLPROG)
 CPPFLAGS+=	-DIPV4LL -DARPING
 SRCS+=		ipv4ll.c
-.endif
+#.endif
 .endif
 
 .if (${USE_INET6} != "no")



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-24 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jul 24 15:06:21 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: logerr.c

Log Message:
Fix SMALL build.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 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/src/logerr.c
diff -u src/external/bsd/dhcpcd/dist/src/logerr.c:1.1.1.4 src/external/bsd/dhcpcd/dist/src/logerr.c:1.2
--- src/external/bsd/dhcpcd/dist/src/logerr.c:1.1.1.4	Wed Jul 24 09:54:55 2019
+++ src/external/bsd/dhcpcd/dist/src/logerr.c	Wed Jul 24 15:06:21 2019
@@ -209,6 +209,7 @@ vlogmessage(int pri, const char *fmt, va
 
 #ifdef SMALL
 	vsyslog(pri, fmt, args);
+	return len;
 #else
 	if (ctx->log_file == NULL) {
 		vsyslog(pri, fmt, args);



<    1   2   3   4   5   >