Re: ttymalloc(int baud)

2020-05-26 Thread Theo de Raadt
The decision to allocate more storage is decided by an unexpected usage pattern we encountered after the API was designed, which isn't immediately obvious from the device name... Some of these devices are designed for high-speed PPP. Some of them (in particular on USB) actually move bytes faster

Re: libpcap: allow breaking out of loop when using savefile

2020-05-26 Thread David Gwynne
I just committed this, thank you :) dlg > On 16 May 2020, at 05:14, Caspar Schutijser wrote: > > Hi, > > Below is a patch that makes breaking out of the loop work when using > a savefile. > > The pcap_breakloop() function was backported from tcpdump.org libpcap > to OpenBSD libpcap by djm@

Re: [PATCH] pipex(4): rework PPP input

2020-05-26 Thread Vitaliy Makkoveev
> On 27 May 2020, at 01:29, Sergey Ryazanov wrote: > > On Tue, May 26, 2020 at 12:07 PM Vitaliy Makkoveev > wrote: >>> On 25 May 2020, at 22:04, Sergey Ryazanov wrote: >>> On Sat, May 23, 2020 at 3:07 PM Vitaliy Makkoveev >>> wrote: For example, each pipex session should have unique

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Jason A. Donenfeld
On Tue, May 26, 2020 at 4:52 PM Jason A. Donenfeld wrote: > With regards to your crash, though, that's a bit more puzzling, and > I'd be interested to learn more details. Because these structs are > already naturally aligned, the __packed attribute, even with the odd > nesting Matt had prior,

Re: [PATCH] pipex(4): rework PPP input

2020-05-26 Thread Sergey Ryazanov
On Wed, May 27, 2020 at 2:12 AM Vitaliy Makkoveev wrote: > > On 27 May 2020, at 01:29, Sergey Ryazanov wrote: > > On Tue, May 26, 2020 at 12:07 PM Vitaliy Makkoveev > > wrote: > >>> On 25 May 2020, at 22:04, Sergey Ryazanov wrote: > >>> On Sat, May 23, 2020 at 3:07 PM Vitaliy Makkoveev > >>>

Re: [PATCH] tcpdump: add ppp address/protocol compression support

2020-05-26 Thread Sergey Ryazanov
Hello! On Mon, May 4, 2020 at 9:37 PM Sergey Ryazanov wrote: > Add support for parsing ppp frames with compressed address and(or) > protocol fields. Since we have no apriory information than try to > guess such frames by inability to parse a frame in a regular way. > > ok? Does someone have any

Re: [RFC] pppd: add pipex(4) L2TP control support

2020-05-26 Thread Sergey Ryazanov
On Tue, May 26, 2020 at 11:31 AM Claudio Jeker wrote: > On Tue, May 26, 2020 at 09:22:28AM +0200, Martin Pieuchot wrote: > > On 25/05/20(Mon) 21:42, Sergey Ryazanov wrote: > > > Add dedicated option to activate kernel L2TP acceleration via > > > the pipex(4). The options should be passed by a

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Jason A. Donenfeld
Hey Klemens, Theo, On Tue, May 26, 2020 at 2:38 PM Klemens Nanni wrote: > > On Tue, May 26, 2020 at 02:23:06PM -0600, Jason A. Donenfeld wrote: > > That's good news that it's working for you now, but I didn't change > > anything within the last 24 hours (you mentioned "yesterday") that > > would

Re: packets to bridged interfaces bypass input filter

2020-05-26 Thread Stephan Mending
On Tue, May 26, 2020 at 09:26:07PM +0200, Sven M. Hallberg wrote: > hi all, > > i sent the following question to misc@ on march 29th but received no > response. i hope you don't mind me retrying on tech@. > > while playing around with pf, i noticed that some connections that i > thought should

Re: [PATCH] pipex(4): rework PPP input

2020-05-26 Thread Sergey Ryazanov
On Tue, May 26, 2020 at 12:07 PM Vitaliy Makkoveev wrote: >> On 25 May 2020, at 22:04, Sergey Ryazanov wrote: >> On Sat, May 23, 2020 at 3:07 PM Vitaliy Makkoveev >> wrote: >>> For example, each pipex session should have unique pair of `protocol’ and >>> `session_id’. These values are passed

[patch] correct return type in pcap_open_live.3

2020-05-26 Thread Edgar Pettijohn
Please see attached diff. Index: pcap_open_live.3 === RCS file: /cvs/src/lib/libpcap/pcap_open_live.3,v retrieving revision 1.3 diff -u -p -u -r1.3 pcap_open_live.3 --- pcap_open_live.325 Sep 2019 17:02:00 - 1.3 +++

ttymalloc(int baud)

2020-05-26 Thread johnc
Another trivial code readability comment: I see 24 references to this in the code, 20 of which pass 0, and 4 of which pass 1,000,000 as the parameter. Passing 0 defaults to a baud of 115200. The baud determines the qlen, which is 4096 for 115200 and 8192 for anything larger, so all it is doing

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Jason A. Donenfeld
On Tue, May 26, 2020 at 2:33 PM Theo de Raadt wrote: > > Jason A. Donenfeld wrote: > > > Hey Klemens, > > > > On Tue, May 26, 2020 at 9:13 AM Klemens Nanni wrote: > > > I worked with the patches from the wireguard-openbsd repository after > > > version one of this diff on tech@ became a bit

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Theo de Raadt
Jason A. Donenfeld wrote: > Hey Klemens, > > On Tue, May 26, 2020 at 9:13 AM Klemens Nanni wrote: > > I worked with the patches from the wireguard-openbsd repository after > > version one of this diff on tech@ became a bit old. > > > > That was until yesterday; the kernel would panic due to

packets to bridged interfaces bypass input filter

2020-05-26 Thread Sven M. Hallberg
hi all, i sent the following question to misc@ on march 29th but received no response. i hope you don't mind me retrying on tech@. while playing around with pf, i noticed that some connections that i thought should be blocked, were in fact not. here is my fairly standard bridge setup between a

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Jason A. Donenfeld
Hey Klemens, On Tue, May 26, 2020 at 9:13 AM Klemens Nanni wrote: > I worked with the patches from the wireguard-openbsd repository after > version one of this diff on tech@ became a bit old. > > That was until yesterday; the kernel would panic due to memory > alignment issues in various spots,

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Jason A. Donenfeld
Hey Tobias, On Tue, May 26, 2020 at 5:28 AM Tobias Heider wrote: > > + if (((SIZE_MAX - size) / sizeof(struct wg_aip_io)) < sc->sc_aip_num) > > + goto error; > > I still think those two should return an error. 'goto error' is misleading as > it doesn't actually set ret != 0.

pppx(4): prevent access to `pxi' being destroyed

2020-05-26 Thread Vitaliy Makkoveev
`pppx_if' has `pxi_ready' field used to prevent access to incomplete `pxi'. But we don't prevent access to `pxi' which we destroy. pppx_if_destroy() can sleep so we can grab `pxi' which we already destroying by concurrent thread and cause use-after-free issue. I guess to use `pxi_ready' to prevent

Error reporting in ikev2_ike_sa_alive (was: Improve error reporting in pfkey_sa_last_used)

2020-05-26 Thread matthew j weaver
During childsa last use checks, iked debug logs results, per SA, after a successful pfkey_sa_last_used call. This patch makes logging behavior more closely match that, on error. I chose log_warn instead of log_debug since iked will complain about the nonzero errno after pfkey_reply:

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Klemens Nanni
On Tue, May 26, 2020 at 08:09:48AM -0600, Theo de Raadt wrote: > I'll let you know who has sparc64 machines to help out: > > kn was the developer who saw the problem. jca is also adept > enough to look at this with you. I worked with the patches from the wireguard-openbsd repository after

Re: filesystem code integer and many inodes

2020-05-26 Thread Otto Moerbeek
On Tue, May 26, 2020 at 03:54:15PM +0200, Otto Moerbeek wrote: > On Tue, May 26, 2020 at 07:51:28AM -0600, Todd C. Miller wrote: > > > On Tue, 26 May 2020 12:07:21 +0200, Otto Moerbeek wrote: > > > > > Apart from the noting the strange Subject: I also like to mention one > > > change in the way

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Theo de Raadt
I'll let you know who has sparc64 machines to help out: kn was the developer who saw the problem. jca is also adept enough to look at this with you.

Re: filesystem code integer and many inodes

2020-05-26 Thread Otto Moerbeek
On Tue, May 26, 2020 at 07:51:28AM -0600, Todd C. Miller wrote: > On Tue, 26 May 2020 12:07:21 +0200, Otto Moerbeek wrote: > > > Apart from the noting the strange Subject: I also like to mention one > > change in the way cylinder groups are scanned. The current code scans > > forward and

Re: filesystem code integer and many inodes

2020-05-26 Thread Todd C . Miller
On Tue, 26 May 2020 12:07:21 +0200, Otto Moerbeek wrote: > Apart from the noting the strange Subject: I also like to mention one > change in the way cylinder groups are scanned. The current code scans > forward and backward, which causes an uneven distribution of full cgs > (the upper end of the

Re: [PATCH] pipex(4): rework PPP input

2020-05-26 Thread Vitaliy Makkoveev
> On 25 May 2020, at 22:04, Sergey Ryazanov wrote: > > Hello Vitaliy, > > On Sat, May 23, 2020 at 3:07 PM Vitaliy Makkoveev > wrote: >>> On 23 May 2020, at 13:11, Sergey Ryazanov wrote: >>> On Wed, May 20, 2020 at 10:13 PM Vitaliy Makkoveev >>> wrote: On Wed, May 20, 2020 at

Re: iked(8): AES_GCM ciphers for IKE

2020-05-26 Thread Tobias Heider
On Thu, May 14, 2020 at 10:07:30PM +0200, Tobias Heider wrote: > Hi, > > currently iked(8) supports AES-GCM only for ESP. > The diff below adds the ENCR_AES_GCM_16 and ENCR_AES_GCM_12 variants for IKE. > (for more information see [1] and [2]). > Both variants support the 128, 196, and 256 bit key

Re: [RFC] pppd: add pipex(4) L2TP control support

2020-05-26 Thread Vitaliy Makkoveev
> On 26 May 2020, at 11:31, Claudio Jeker wrote: > > [skip] > > Is pppd(8) still using K function declarations? Can we please add new > functions with ANSI declarations instead and convert the rest as well. > Also it looks like something strange is going on with indentation (just > look at

iwx: fix tx queue index in iwx_tx()

2020-05-26 Thread Stefan Sperling
When enabling Tx queues in iwx_enable_data_tx_queues() the driver computes the Tx queue index as: int qid = ac + IWX_DQA_AUX_QUEUE + 1; with: #define IWX_DQA_AUX_QUEUE 1 In iwx_tx(), we use a different way of computing the Tx queue index, which is a leftover from

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Tobias Heider
On Tue, May 26, 2020 at 07:39:01PM +1000, Matt Dunwoodie wrote: > Hi tech, > > After some feedback and comments, we've addressed the concerns, and > fixed a few things from our side too. Overall the structure is familiar > with no major changes, so any prior readings mostly carry over. > > This

Re: filesystem code integer and many inodes

2020-05-26 Thread Otto Moerbeek
On Tue, May 26, 2020 at 11:58:39AM +0200, Otto Moerbeek wrote: > Hi, > > In theory ffs code support a maximum of UINT_MAX inodes, but in > practice, due to integer overflows in the current code, the limit is > INT_MAX inodes. > > This fixes that, and allows me to create and use filesystems with

filesystem code integer and many inodes

2020-05-26 Thread Otto Moerbeek
Hi, In theory ffs code support a maximum of UINT_MAX inodes, but in practice, due to integer overflows in the current code, the limit is INT_MAX inodes. This fixes that, and allows me to create and use filesystems with more than INT_MAX inodes. This is partly from FreeBSD code. Main change is

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Jason A. Donenfeld
Hey tech@, A few things I thought I should add to our v2 revision: First, the improvements we've made in the last few weeks have been pretty substantial, and we've now got a much more faithful protocol implementation. I've been running this on a few high traffic servers, and I'll probably move

Initialize v4l2_requestbuffers struct to avoid invalid mmap

2020-05-26 Thread Ingo Feinerer
video(1) supports reading frames from a webcam via mmap(). To inform the V4L2 device about the number of desired buffers containing the frames to be memory-mapped, a VIDIOC_REQBUFS ioctl call is used. At the moment the v4l2_requestbuffers struct used for the VIDIOC_REQBUFS ioctl is only partially

Re: sysupgrade change to allow installing from url

2020-05-26 Thread Florian Obser
On Tue, May 26, 2020 at 12:03:50AM +0200, Sebastian Benoit wrote: > Solene Rapenne(sol...@perso.pw) on 2020.05.25 15:25:40 +0200: > > Hi, > > > > I don't know if this will be accepted but I propose to add a -u [url] > > parameter to use older snapshots from an archive server for example. > > > >

Re: [RFC] pppd: add pipex(4) L2TP control support

2020-05-26 Thread Claudio Jeker
On Tue, May 26, 2020 at 09:22:28AM +0200, Martin Pieuchot wrote: > On 25/05/20(Mon) 21:42, Sergey Ryazanov wrote: > > Add dedicated option to activate kernel L2TP acceleration via > > the pipex(4). The options should be passed by a L2TP tunnel > > management daemon (e.g. xl2tpd). > > What is the

Re: [RFC] pppd: add pipex(4) L2TP control support

2020-05-26 Thread Martin Pieuchot
On 25/05/20(Mon) 21:42, Sergey Ryazanov wrote: > Add dedicated option to activate kernel L2TP acceleration via > the pipex(4). The options should be passed by a L2TP tunnel > management daemon (e.g. xl2tpd). What is the difference between npppd(8) and pppd(8)? Aren't those two redundant? Why

Re: TP-Link TL-WN822N-EU v5 USB ID

2020-05-26 Thread Jonathan Gray
On Mon, May 25, 2020 at 11:27:27PM +0300, Tero Koskinen wrote: > Hi, > > I have TP-Link TL-WN822N-EU v5 USB adapter[1] with > USB VID/PID 2357:0108: > > $ usbdevs > Controller /dev/usb0: > addr 01: 1022: AMD, xHCI root hub > addr 02: 2357:0108 Realtek, 802.11n NIC > Controller /dev/usb1: >