Re: cat(1): always use a 64K buffer

2021-12-12 Thread Otto Moerbeek
On Sun, Dec 12, 2021 at 07:15:51PM -0600, Scott Cheloha wrote: > cat(1) sizes its I/O buffer according to the st_blksize of the first > file it processes. We don't do this very often in the tree. I'm not > sure if we should trust st_blksize. > > It would be simpler to just choose a value that w

Re: syzkaller nd6_dad_duplicated

2021-12-12 Thread Jonathan Gray
On Sun, Dec 12, 2021 at 11:57:54PM +0100, Alexander Bluhm wrote: > Hi, > > Syskaller has found a NULL deref in nd6_dad_duplicated(). > > https://syzkaller.appspot.com/bug?id=f2ee1cc75911fa580176b09e7c1ab9d867590994 > > The code in nd6_dad_ns_input() looks fishy. It checks dp in two > of three p

cat(1): always use a 64K buffer

2021-12-12 Thread Scott Cheloha
cat(1) sizes its I/O buffer according to the st_blksize of the first file it processes. We don't do this very often in the tree. I'm not sure if we should trust st_blksize. It would be simpler to just choose a value that works in practice and always use it. 64K works well. We settled on that f

Re: DNS in acme-client

2021-12-12 Thread Jeremie Courreges-Anglas
On Sun, Dec 12 2021, Florian Obser wrote: > On 12 December 2021 21:19:21 CET, Jeremie Courreges-Anglas > wrote: >> >>dnsproc.c only returns a single address even if the code pretends to >>support multiple addresses. This leads to weird behavior in edge cases, >>as experienced by a user on IRC.

Re: Handle multi-port CP2108 devices in uslcom(4)

2021-12-12 Thread Jonathan Gray
On Sun, Dec 12, 2021 at 03:18:21PM +, Visa Hankala wrote: > Silicon Labs CP2108 USB device can implement up to four COM ports. Each > port appears as a separate USB virtual COM interface under the device. > > Currently, uslcom(4) always uses the device's first interface, which is > wrong when

syzkaller nd6_dad_duplicated

2021-12-12 Thread Alexander Bluhm
Hi, Syskaller has found a NULL deref in nd6_dad_duplicated(). https://syzkaller.appspot.com/bug?id=f2ee1cc75911fa580176b09e7c1ab9d867590994 The code in nd6_dad_ns_input() looks fishy. It checks dp in two of three places. One check got lost in revision 1.83. Do a dp == NULL once at the beginni

Re: DNS in acme-client

2021-12-12 Thread Florian Obser
On 12 December 2021 21:19:21 CET, Jeremie Courreges-Anglas wrote: > >dnsproc.c only returns a single address even if the code pretends to >support multiple addresses. This leads to weird behavior in edge cases, >as experienced by a user on IRC. > >Take a machine with both IPv4 and IPv6 addres

DNS in acme-client

2021-12-12 Thread Jeremie Courreges-Anglas
dnsproc.c only returns a single address even if the code pretends to support multiple addresses. This leads to weird behavior in edge cases, as experienced by a user on IRC. Take a machine with both IPv4 and IPv6 addresses configured, but no IPv4 default route (on purpose). Since there is at l

Re: ipsec ipo tdb mutex

2021-12-12 Thread Hrvoje Popovski
On 11.12.2021. 20:03, Alexander Bluhm wrote: > On Sat, Dec 11, 2021 at 12:53:35AM +0100, Alexander Bluhm wrote: >> To cache lookups, the policy ipo is linked to its SA tdb. There >> is a list of SAs that belong to a policy. To make it MP safe we >> need a mutex around these pointers. >> >> Hrvoje

Re: add number of prefixed received to bgpctl -j sh

2021-12-12 Thread Denis Fondras
Le Sun, Dec 12, 2021 at 04:05:39PM +0100, Claudio Jeker a écrit : > I did not do this because it is not supposed to be the same as the human > ouutput. > Oh, that's fine then :)

Handle multi-port CP2108 devices in uslcom(4)

2021-12-12 Thread Visa Hankala
Silicon Labs CP2108 USB device can implement up to four COM ports. Each port appears as a separate USB virtual COM interface under the device. Currently, uslcom(4) always uses the device's first interface, which is wrong when there are multiple ports. The following patch adjusts the driver to use

Re: add number of prefixed received to bgpctl -j sh

2021-12-12 Thread Claudio Jeker
On Sun, Dec 12, 2021 at 03:22:37PM +0100, Denis Fondras wrote: > Le Sun, Dec 12, 2021 at 01:43:06PM +, Stuart Henderson a écrit : > > On 2021/12/12 14:13, Denis Fondras wrote: > > > Number of received prefixes appear in `bgpctl sh` but not in `bgpctl -j > > > sh`. > > > > > > Here is a diff t

Re: add number of prefixed received to bgpctl -j sh

2021-12-12 Thread Denis Fondras
Le Sun, Dec 12, 2021 at 01:43:06PM +, Stuart Henderson a écrit : > On 2021/12/12 14:13, Denis Fondras wrote: > > Number of received prefixes appear in `bgpctl sh` but not in `bgpctl -j sh`. > > > > Here is a diff to add this piece of information. > > > > OK ? > > Makes sense, but if prefix_c

Re: add number of prefixed received to bgpctl -j sh

2021-12-12 Thread Stuart Henderson
On 2021/12/12 14:13, Denis Fondras wrote: > Number of received prefixes appear in `bgpctl sh` but not in `bgpctl -j sh`. > > Here is a diff to add this piece of information. > > OK ? Makes sense, but if prefix_cnt is added, max_prefix probably should be too > Index: output_json.c >

add number of prefixed received to bgpctl -j sh

2021-12-12 Thread Denis Fondras
Number of received prefixes appear in `bgpctl sh` but not in `bgpctl -j sh`. Here is a diff to add this piece of information. OK ? Index: output_json.c === RCS file: /cvs/src/usr.sbin/bgpctl/output_json.c,v retrieving revision 1.12