unbound(8): make ip-transparent option work on OpenBSD

2017-11-01 Thread Florian Obser
This is useful on systems where IP addresses are dynamically configured (dhclient(8), slaacd(8)) and are not yet up when unbound starts. To quote the man page: ip-transparent: If yes, then use IP_TRANSPARENT socket option on sockets where unbound is listening

armv7: useless global between cpufunc.c & locore.S

2017-11-01 Thread Artturi Alm
Hi, i think V4 or higher can already be assumed, because we're protected by EFI anyway, right? it can't be zero unless set_cpufuncs() does fail. like can be seen from the diff below, only the unified TLB invalidation was conditional anymore, not the instruction disabling the MMU, like suggested

NULL pointer dereference in ip*_send()

2017-11-01 Thread Alexandr Nedvedicky
Hello, the patch [1] I've committed yesterday needs a follow up commit below. the problem was found by Hrvoje. my deep apologize regards sasha [1] https://marc.info/?l=openbsd-tech=150944369215209=2 8<---8<---8<--8< diff --git

Re: NULL pointer dereference in ip*_send()

2017-11-01 Thread Theo Buehler
On Wed, Nov 01, 2017 at 01:14:44PM +0100, Alexandr Nedvedicky wrote: > Hello, > > the patch [1] I've committed yesterday needs a follow up commit below. > the problem was found by Hrvoje. Already fixed by mpi a few hours ago: https://marc.info/?l=openbsd-cvs=150951814421443=2

Re: nsd(8): make ip-transparent option work on OpenBSD

2017-11-01 Thread Jeremie Courreges-Anglas
On Wed, Nov 01 2017, Florian Obser wrote: > OK? ok jca@ btw the diff below has already been posted to tech@: https://marc.info/?l=openbsd-tech=147747266305927=2 > diff --git server.c server.c > index c0835ce8c11..fe74f9a1b56 100644 > --- server.c > +++ server.c > @@

ksh alloc(): switch calloc back to malloc

2017-11-01 Thread Theo Buehler
The plaintext history diff changed memory allocation in alloc() from malloc() to calloc(). At that point, some of the new code in history.c may (or may not) have depended on this. In the meantime, this code was removed by jca in his cleanup of history.c that happened shortly before the 6.2

nsd(8): make ip-transparent option work on OpenBSD

2017-11-01 Thread Florian Obser
OK? diff --git server.c server.c index c0835ce8c11..fe74f9a1b56 100644 --- server.c +++ server.c @@ -567,7 +567,7 @@ server_init_ifs(struct nsd *nsd, size_t from, size_t to, int* reuseport_works) { struct addrinfo* addr; size_t i; -#if defined(SO_REUSEPORT) ||

Re: makefs: malloc -> emalloc

2017-11-01 Thread Jeremie Courreges-Anglas
On Wed, Nov 01 2017, "Michael W. Bombardieri" wrote: > Hello, > > makefs has an xmalloc.c with emalloc() function, but one thing > was still using malloc() directly. This patch makes malloc() > always happen through emalloc(). Fails to build, implicit emalloc decl. > - Michael > >

Re: ksh alloc(): switch calloc back to malloc

2017-11-01 Thread Jeremie Courreges-Anglas
On Wed, Nov 01 2017, Theo Buehler wrote: > The plaintext history diff changed memory allocation in alloc() from > malloc() to calloc(). At that point, some of the new code in history.c > may (or may not) have depended on this. In the meantime, this code was > removed by jca

Re: unbound(8): make ip-transparent option work on OpenBSD

2017-11-01 Thread Jeremie Courreges-Anglas
On Wed, Nov 01 2017, Florian Obser wrote: > This is useful on systems where IP addresses are dynamically > configured (dhclient(8), slaacd(8)) and are not yet up when unbound > starts. > > To quote the man page: > >ip-transparent: > If yes, then use

Re: unbound(8): make ip-transparent option work on OpenBSD

2017-11-01 Thread Sebastian Benoit
ok benno@ Florian Obser(flor...@openbsd.org) on 2017.11.01 12:00:45 +0100: > This is useful on systems where IP addresses are dynamically > configured (dhclient(8), slaacd(8)) and are not yet up when unbound > starts. > > To quote the man page: > >ip-transparent: > If

Re: nsd(8): make ip-transparent option work on OpenBSD

2017-11-01 Thread Sebastian Benoit
ok Florian Obser(flor...@openbsd.org) on 2017.11.01 12:17:44 +0100: > OK? > > diff --git server.c server.c > index c0835ce8c11..fe74f9a1b56 100644 > --- server.c > +++ server.c > @@ -567,7 +567,7 @@ server_init_ifs(struct nsd *nsd, size_t from, size_t to, > int* reuseport_works) > { >

Re: pr(1) - ignore LC_TIME

2017-11-01 Thread Mark Kettenis
> From: Jeremie Courreges-Anglas > Date: Wed, 01 Nov 2017 17:25:45 +0100 > > On Wed, Nov 01 2017, Mark Kettenis wrote: > >> Date: Wed, 1 Nov 2017 17:04:44 +0100 > >> From: Jan Stary > >> > >> Doesn't OpenBSD strftime() ignore LC_TIME

awk setlocale(LC_NUMERIC)

2017-11-01 Thread Jan Stary
Why does awk need to fiddle with LC_NUMERIC? Jan Index: main.c === RCS file: /cvs/src/usr.bin/awk/main.c,v retrieving revision 1.21 diff -u -p -r1.21 main.c --- main.c 9 Oct 2017 14:51:31 - 1.21 +++ main.c

pr(1) - ignore LC_TIME

2017-11-01 Thread Jan Stary
Doesn't OpenBSD strftime() ignore LC_TIME anyway? Jan Index: pr.c === RCS file: /cvs/src/usr.bin/pr/pr.c,v retrieving revision 1.39 diff -u -p -r1.39 pr.c --- pr.c11 Nov 2015 02:52:46 - 1.39 +++ pr.c

zic.c does not need locale.h

2017-11-01 Thread Jan Stary
Index: zic.c === RCS file: /cvs/src/usr.sbin/zic/zic.c,v retrieving revision 1.22 diff -u -p -r1.22 zic.c --- zic.c 15 Mar 2016 19:50:47 - 1.22 +++ zic.c 1 Nov 2017 15:52:04 - @@ -11,7 +11,6 @@ #include

Re: awk setlocale(LC_NUMERIC)

2017-11-01 Thread Jeremie Courreges-Anglas
On Wed, Nov 01 2017, Jan Stary wrote: > Why does awk need to fiddle with LC_NUMERIC? awk is not developed in OpenBSD land[1]. Since LC_NUMERIC doesn't have any effect on OpenBSD I'd rather just let this code be. [1] https://www.cs.princeton.edu/~bwk/btl.mirror/ > Jan > >

Re: pr(1) - ignore LC_TIME

2017-11-01 Thread Mark Kettenis
> Date: Wed, 1 Nov 2017 17:04:44 +0100 > From: Jan Stary > > Doesn't OpenBSD strftime() ignore LC_TIME anyway? One day we will support it. I see no reason to remove this call (or any of the others you're proposing). > Index: pr.c >

Re: pr(1) - ignore LC_TIME

2017-11-01 Thread Jeremie Courreges-Anglas
On Wed, Nov 01 2017, Mark Kettenis wrote: >> Date: Wed, 1 Nov 2017 17:04:44 +0100 >> From: Jan Stary >> >> Doesn't OpenBSD strftime() ignore LC_TIME anyway? > > One day we will support it. I see no reason to remove this call (or > any of the others

Re: awk setlocale(LC_NUMERIC)

2017-11-01 Thread Christian Weisgerber
On 2017-11-01, Jan Stary wrote: > Why does awk need to fiddle with LC_NUMERIC? You don't want to parse your awk program in a locale where the decimal separator is a comma. -- Christian "naddy" Weisgerber na...@mips.inka.de

if_ioctl & netinet{,6}

2017-11-01 Thread Martin Pieuchot
ifioctl() contains two fallthrough paths that end up in ifp->if_ioctl(). The diff below merges them. But instead of calling ifp->if_ioctl() from inside in{,6}_ioctl(), I changed the logic to return EOPNOTSUPP. The idea is that if_ioctl() is part of the driver and will need a different lock than