daily CVS update output

2018-09-11 Thread NetBSD source update


Updating src tree:
P src/bin/sh/jobs.h
P src/sys/arch/arm/samsung/exynos_platform.c
P src/sys/arch/arm/samsung/exynos_uart.c
P src/sys/arch/arm/samsung/files.exynos
P src/sys/arch/arm/samsung/mct.c
P src/sys/arch/evbarm/conf/EXYNOS
P src/sys/arch/evbarm/exynos/exynos_start.S
P src/sys/compat/common/uipc_syscalls_50.c
P src/usr.sbin/sysinst/defs.h
P src/usr.sbin/sysinst/main.c
P src/usr.sbin/sysinst/menus.mi
P src/usr.sbin/sysinst/msg.mi.de
P src/usr.sbin/sysinst/msg.mi.en
P src/usr.sbin/sysinst/msg.mi.es
P src/usr.sbin/sysinst/msg.mi.fr
P src/usr.sbin/sysinst/msg.mi.pl
P src/usr.sbin/sysinst/net.c

Updating xsrc tree:


Killing core files:



Updating release-7 src tree (netbsd-7):

Updating release-7 xsrc tree (netbsd-7):



Updating release-8 src tree (netbsd-8):
P bin/sh/expand.c
P bin/sh/parser.c
P bin/sh/syntax.c
P bin/sh/syntax.h
P distrib/sgimips/instkernel/Makefile
U doc/CHANGES-8.1
P sbin/raidctl/raidctl.8
P sbin/raidctl/rf_configure.c
P sbin/raidctl/rf_configure.h
P sys/arch/sgimips/conf/INSTALL32_IP2x
P sys/arch/sgimips/hpc/wdsc.c
P sys/arch/sgimips/sgimips/machdep.c
P sys/arch/sgimips/stand/boot/Makefile
P sys/netinet/in_l2tp.c
P sys/netinet6/in6_l2tp.c
P usr.bin/find/function.c

Updating release-8 xsrc tree (netbsd-8):




Updating file list:
-rw-rw-r--  1 srcmastr  netbsd  57208977 Sep 12 03:09 ls-lRA.gz


Re: Travel router part 2

2018-09-11 Thread Brett Lymn
On Wed, Sep 05, 2018 at 01:03:19PM +0100, Roy Marples wrote:
> 
> Since NetBSD-6, dhclient-script has shipped with resolvconf(8) support 
> that will do that for you.
> 

Oh cool, I didn't know - I have been using my hack for so long I never
thought to see if there was something better...

-- 
Brett Lymn
Let go, or be dragged - Zen proverb.


Re: SIOC[GZ]IFDATA fix

2018-09-11 Thread Robert Elz
Oh, sorry, I missed a couple of leading '-' chars in your patch.
What you did was exactly what I suggested (and some meaningless
code motion which changes nothing.)

So, yes, it all looks fine.

kre



Re: SIOC[GZ]IFDATA fix

2018-09-11 Thread Robert Elz
Date:Tue, 11 Sep 2018 18:49:37 +0900
From:Masanobu SAITOH 
Message-ID:  

  | OK?

Looks broken to me.   SIOCGIFDATA and OSIOCGIFDATA (etc)
take different structs as args - treating them as aliases cannot possibly
be correct, can it?

The function already uses 
struct oifdatareq *ifdr = data;
whcih suggests it is not handling the SIOC forms at all, they would
have a struct ifdatareq * as the data.

Perhaps the problem is that only the Oxxx forms should be handled
in that function, and all that is needed to fix it is to add an O to the
ioctl names ?

kre



SIOC[GZ]IFDATA fix

2018-09-11 Thread Masanobu SAITOH

 Hi.

 I noticed that -current's SIOC[GZ]IFDATA doesn't work correctly.
It's OK on netbsd-8.


static int
doifioctl(struct socket *so, u_long cmd, void *data, struct lwp *l)
{
struct ifnet *ifp;
struct ifreq *ifr;
int error = 0;
#if defined(COMPAT_OSOCK) || defined(COMPAT_OIFREQ)
u_long ocmd = cmd;
#endif
short oif_flags;
#ifdef COMPAT_OIFREQ
struct ifreq ifrb;
struct oifreq *oifr = NULL;
#endif
int r;
struct psref psref;
int bound;

switch (cmd) {
case SIOCGIFCONF:
return ifconf(cmd, data);
case SIOCINITIFADDR:
return EPERM;
default:
error = (*vec_compat_ifconf)(l, cmd, data);
if (error != ENOSYS)
return error;
error = (*vec_compat_ifdatareq)(l, cmd, data);
if (error != ENOSYS) <<==
return error;
break;
}


The call of vec_compat_ifdatareq() always returns other than ENOSYS.


Patch:

Index: uipc_syscalls_50.c
===
RCS file: /cvsroot/src/sys/compat/common/uipc_syscalls_50.c,v
retrieving revision 1.5
diff -u -p -r1.5 uipc_syscalls_50.c
--- uipc_syscalls_50.c  26 Apr 2018 08:11:18 -  1.5
+++ uipc_syscalls_50.c  11 Sep 2018 09:45:31 -
@@ -65,23 +65,24 @@ compat_ifdatareq(struct lwp *l, u_long c
 
 	/* Validate arguments. */

switch (cmd) {
-   case SIOCGIFDATA:
-   case SIOCZIFDATA:
-   ifp = ifunit(ifdr->ifdr_name);
-   if (ifp == NULL)
-   return ENXIO;
+   case OSIOCGIFDATA:
+   case OSIOCZIFDATA:
break;
default:
return ENOSYS;
}
 
+	ifp = ifunit(ifdr->ifdr_name);

+   if (ifp == NULL)
+   return ENXIO;
+
/* Do work. */
switch (cmd) {
-   case SIOCGIFDATA:
+   case OSIOCGIFDATA:
ifdatan2o(>ifdr_data, >if_data);
return 0;
 
-	case SIOCZIFDATA:

+   case OSIOCZIFDATA:
if (l != NULL) {
error = kauth_authorize_network(l->l_cred,
KAUTH_NETWORK_INTERFACE,


OK?


--
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)