net/bpf: SIZEOF_BPF_HDR vs __packed+CTASSERT; removing 3xXXX.

2018-07-17 Thread Artturi Alm
Hi, rather random "i want to clear those XXXs"-moment with morning coffee, did seem like this was screaming for __packed from sys/cdefs.h, and less MD in sys/net/, if nothing else. With a bit of googling i also ran into a different solution, which is as ugly as what i'm replacing, imo.., that

Re: iked support for IKEv2 Message Fragmentation (RFC 7383)

2018-07-17 Thread Tim Stewart
Hello tech@, Here is a small initial patch related to message fragmentation. ikev2_msg_decrypt() claims to strip the padding from the decrypted IKE payloads, but actually leaves it tacked on the end of the returned ibuf. This is fine in the unfragmented case since the inner payloads have

Re: join(1): use getline instead of fgetln

2018-07-17 Thread Lauri Tirkkonen
On Tue, Jul 17 2018 13:38:14 -0600, Todd C. Miller wrote: > On Tue, 17 Jul 2018 13:21:31 -0600, "Todd C. Miller" wrote: > > > It probably makes more sense to do the newline check (and decrement > > len if one is present) before newsize is computed. Then you would > > need to unconditionally

Re: join(1): use getline instead of fgetln

2018-07-17 Thread Lauri Tirkkonen
On Tue, Jul 17 2018 13:21:31 -0600, Todd C. Miller wrote: > > @@ -360,17 +364,15 @@ slurpit(INPUT *F) > > lp->linealloc = newsize; > > } > > F->setusedc++; > > - memmove(lp->line, bp, len); > > + memmove(lp->line, line, len); > >

Re: join(1): use getline instead of fgetln

2018-07-17 Thread Todd C. Miller
On Tue, 17 Jul 2018 13:21:31 -0600, "Todd C. Miller" wrote: > It probably makes more sense to do the newline check (and decrement > len if one is present) before newsize is computed. Then you would > need to unconditionally NUL-terminate lp->line. Perhaps something like this. - todd Index:

Re: join(1): use getline instead of fgetln

2018-07-17 Thread Todd C. Miller
On Tue, 17 Jul 2018 19:39:16 +0300, Lauri Tirkkonen wrote: > while porting join(1) to Unleashed OS (which does not have fgetln(3)) I > came up with the following. Since the fgetln man page advises against > using it, I thought OpenBSD might want this diff too. Looks good. One minor comment

Remove cruft: libm/noieee_src

2018-07-17 Thread Christian Weisgerber
Since the VAX port was discontinued, all our remaining architectures use IEEE floating point, as will any future ones. For this reason, I would like to remove all of libm/noieee_src, which is unused now. I don't quite know how to actually prove that it is unused, but * I grepped the full src

paste(1): use getline instead of fgetln

2018-07-17 Thread Lauri Tirkkonen
In the same vein as my previous diff for join(1), make paste(1) use getline instead of fgetln. diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index fd51bfa0a4c..185fb6d1535 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -107,8 +107,8 @@ parallel(char **argv)

join(1): use getline instead of fgetln

2018-07-17 Thread Lauri Tirkkonen
Hi, while porting join(1) to Unleashed OS (which does not have fgetln(3)) I came up with the following. Since the fgetln man page advises against using it, I thought OpenBSD might want this diff too. diff --git a/usr.bin/join/join.c b/usr.bin/join/join.c index 3049a423196..ac62cf83cd1 100644 ---

bgpctl show mrt without bgpd running

2018-07-17 Thread Claudio Jeker
There is no reason why bgpd must be running to do a bgpctl show mrt call. This diff moves the SHOW_MRT case up to the IRRFILTER one and also makes the pledge() calls stricter. I see no reason why rpath or wpath are needed and neither did benno@ remember why. OK? -- :wq Claudio Index: bgpctl.c

teach bgpctl show mrt to handle timestamps

2018-07-17 Thread Claudio Jeker
This diffs adds timestamps similar to kdump to bgpctl show mrt output when messages or states are shown. Currently it looks like this: 1531425344.00 153.5.146.105[23456] -> 62.48.0.253[0]: size 63 0.00 153.5.146.105[23456] -> 62.48.0.253[0]: Connect -> OpenSent 0.00

Re: Replace getprogname() to argv[0] in bnaddsub

2018-07-17 Thread Kinichiro Inoguchi
__progname is not portable, and I once requested to eliminate it. For porable reason, I prefer to using argv[0]. Anyway, thanks for your comment. Kinichiro Inoguchi On Tue, Jul 17, 2018 at 12:01:59PM -0300, Gleydson Soares wrote: > On Tue, Jul 17, 2018 at 10:09:37PM +0900, Kinichiro Inoguchi

Re: Replace getprogname() to argv[0] in bnaddsub

2018-07-17 Thread Gleydson Soares
On Tue, Jul 17, 2018 at 10:09:37PM +0900, Kinichiro Inoguchi wrote: > To run regress bnaddsub on Windows, I would like to supersede getprogname > with argv[0] since it is not on Windows. > > OK ? > > Index: regress/lib/libcrypto/bn/addsub/bnaddsub.c >

Replace getprogname() to argv[0] in bnaddsub

2018-07-17 Thread Kinichiro Inoguchi
To run regress bnaddsub on Windows, I would like to supersede getprogname with argv[0] since it is not on Windows. OK ? Index: regress/lib/libcrypto/bn/addsub/bnaddsub.c === RCS file:

Re: USB device & port number

2018-07-17 Thread Martin Pieuchot
On 12/07/18(Thu) 12:25, Martin Pieuchot wrote: > Diff below extends 'struct usb_device_info' to include the port number > where the USB device is attached to. It doesn't grow the structure and > reuse implicit padding. > > I'd like to export the port number to userland to satisfy devel/libusb1,

Re: IP_SENDSRCADDR cmsg_len and dnsmasq

2018-07-17 Thread Jeremie Courreges-Anglas
On Mon, Jul 16 2018, Vincent Gross wrote: > On Thu, 12 Jul 2018 19:54:26 +0200 > Alexander Bluhm wrote: > >> >> If it is a temporary problem, that will go away when the content >> of the socket buffer is sent away, we should block or return >> EWOULDBLOCK. For a permanent problem return