Re: run(4) firmware update; please test

2014-05-16 Thread Gerhard Roth
On Fri, 16 May 2014 13:07:24 +0200 Stefan Sperling s...@openbsd.org wrote: On Fri, May 16, 2014 at 02:44:10PM +0400, Dinar Talypov wrote: Hi, I have tested with D-Link DWA-140 rev B2G: run0 at uhub0 port 1 Ralink 11n Adapter rev 1.10/1.01 addr 2 run0: MAC/BBP RT3071 (rev 0x021C),

SNMPv3 engine id discovery

2013-08-16 Thread Gerhard Roth
Hi, in SNMPv3 engine id discovery is done by sending a noAuthNoPriv request to the SNMP agent. The agent should reply with a usmStatsUnknownEngineIDs report containing the authoritative engine id. In case snmpd was configured with a minimum seclevel higher than none, a

Fw: SNMPv3 engine id discovery

2013-09-09 Thread Gerhard Roth
Anybody willing to ok that patch? Gerhard Begin forwarded message: Date: Fri, 16 Aug 2013 10:24:02 +0200 From: Gerhard Roth gr...@genua.de To: tech@openbsd.org Subject: SNMPv3 engine id discovery Hi, in SNMPv3 engine id discovery is done by sending a noAuthNoPriv request to the SNMP agent

pf dropping window updates and acks

2013-10-11 Thread Gerhard Roth
In January bluhm@ introduced 'data_end' to pf.c:tcp_track_full(). Now this breaks the handling of non-data packets. They may be rejected because the SEQ_GEQ(src-seqhi, data_end) check fails. The patch below should fix this. Gerhard Index: sys/net/pf.c

Memory leak in snmpd(8)

2012-05-24 Thread Gerhard Roth
Hi, with the OPENBSD-CARP-MIB a memory leak was introduced to snmpd(8): RCS file: mib.c,v retrieving revision 1.52 diff -u -p -r1.52 mib.c --- mib.c 2012/03/20 03:01:26 1.52 +++ mib.c 2012/05/24 12:53:35 @@ -2713,7 +2713,7 @@ mib_carpiftable(struct oid *oid, struct ber_oid *o,

Re: Memory leak in snmpd(8)

2012-05-24 Thread Gerhard Roth
On Thu, 24 May 2012 16:16:02 +0200, Kenneth R Westerback kwesterb...@rogers.com wrote: On Thu, May 24, 2012 at 01:54:36PM +0200, Gerhard Roth wrote: Hi, with the OPENBSD-CARP-MIB a memory leak was introduced to snmpd(8): RCS file: mib.c,v retrieving revision 1.52 diff -u -p -r1.52 mib.c

IP Routing Fix

2012-06-22 Thread Gerhard Roth
Hi everybody, there is code in ether_output() that handles the case that we have to use a gateway to send the packet. This code does a lookup for the route required to reach the gateway. In case there is a gateway for which no direct route exists (surely a stupid thing, but possible during

mkdep(1) misses compilation errors

2012-06-25 Thread Gerhard Roth
Hi, the exit status of a shell pipeline is the exit status of the last command in the pipeline. Since mkdep(1) pipes the output of ${CC} into sed(1), the following check of '$?' checks the exit status of sed(1) and not the of of cc(1). This is nasty if some modification broke the compilation of

SNMPv3 Support

2012-07-17 Thread Gerhard Roth
Hi all, below you'll find a patch that adds basic SNMPv3 support to OpenBSD's snmpd(8). When I say basic that's because of some limitations: - Traps are still sent via SNMPv2 protocol. They can neither be authenticated nor encrypted. - Transport mode is still UDP. Not additional

Re: SNMPv3 Support

2012-07-17 Thread Gerhard Roth
On Tue, 17 Jul 2012 11:21:04 +0200, Gerhard Roth gerhard_r...@genua.de wrote: Hi all, below you'll find a patch that adds basic SNMPv3 support to OpenBSD's snmpd(8). When I say basic that's because of some limitations: - Traps are still sent via SNMPv2 protocol. They can neither

Re: SNMPv3 Support

2012-07-18 Thread Gerhard Roth
On Wed, 18 Jul 2012 16:51:27 +0200, Mike Belopuhov m...@crypt.org.ru wrote: On Wed, Jul 18, 2012 at 4:16 PM, Gerhard Roth wrote: same here, wouldn't it be possible to match the ipsec.conf grammar and ignore the SNMPv3 naming a bit? auth hmac-sha1 authkey fooobar enc aes enckey dkjdkj - instead

Re: SNMPv3 Support

2012-07-19 Thread Gerhard Roth
Hi Reyk, On Wed, 18 Jul 2012 21:42:34 +0200, Reyk Floeter r...@openbsd.org wrote: How about: noAuthNoPriv- none authNoPriv - auth authPriv- encr Is there a better alternative for encr? Maybe just enc (I know it would complicate the grammar because

Bug in calibration of local APIC timer

2012-09-17 Thread Gerhard Roth
Hi, I spotted a problem with the calibration of the local APIC clock. For the second CPU you sometimes see impossibly high clock rates like in the following example: cpu0: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz (GenuineIntel 686-class) 3.10 GHz cpu0:

Problem in vr_stop()

2012-09-18 Thread Gerhard Roth
Hi, we observed mysterious panics while stopping vr interfaces. This was due to vr_stop() trying to stop the transfers but then not waiting for them to really finish but rather remove their DMA buffer mappings immediately. The patch below uses a loop that was copied from vr_setcfg()

DNS options for sppp(4)

2012-10-05 Thread Gerhard Roth
Hi, I trying to revive part of an old patch that was submitted by mpf in 2007. If adds support for DNS server negotiation to the IPCP part of sppp(4). If the PPP server provides IP addresses for DNS servers, they will appear in the ifconfig(8) output. A simple ifstated(8) script could then be

Re: DNS options for sppp(4)

2012-10-25 Thread Gerhard Roth
On 10/25/2012 10:44 AM, LEVAI Daniel wrote: On p, okt 05, 2012 at 13:46:19 +0200, Gerhard Roth wrote: Hi, I trying to revive part of an old patch that was submitted by mpf in 2007. If adds support for DNS server negotiation to the IPCP part of sppp(4). If the PPP server provides IP addresses

Re: [PATCH] mlockall() problem in OpenBSD 5.2

2012-11-08 Thread Gerhard Roth
I did a similar change recently (http://marc.info/?l=openbsd-cvsm=135055003602935w=2). Therefore I think that Ilya's patch is valid and should be applied. If anyone is willing to ok, I can commit it. Gerhard On 11/08/2012 01:34 PM, Ilya Bakulin wrote: Hi list, after upgrade on OpenBSD 5.2 we

Re: [PATCH] mlockall() problem in OpenBSD 5.2

2012-11-08 Thread Gerhard Roth
On 11/08/2012 02:08 PM, Stuart Henderson wrote: Oh talking of RLIMIT reminds me...can someone who knows this area take a look at http://thread.gmane.org/gmane.os.aeriebsd.general/100 please? To me the fix looks reasonable. Limiting the stack size below the current usage shouldn't be allowed.

Re: [PATCH] mlockall() problem in OpenBSD 5.2

2012-11-09 Thread Gerhard Roth
On Thu, 08 Nov 2012 16:22:41 -0500 Ted Unangst t...@tedunangst.com wrote: On Thu, Nov 08, 2012 at 13:34, Ilya Bakulin wrote: The problem seems to be in uvm_map_pageable_all() function (sys/uvm/uvm_map.c). This function is a special case of uvm_map_pageable, which tries to mlockall() all

Re: cloneable tun

2012-11-29 Thread Gerhard Roth
On 11/29/2012 01:33 PM, Reyk Floeter wrote: On Thu, Nov 29, 2012 at 10:59 AM, Mike Belopuhov m...@belopuhov.com wrote: But currently /dev/tunN is usable from any programming language that that can do reads and writes. With Reyk's changes you need to do an ioctl even for basic usage, which is

Re: Add Soekris comBIOS detection to bios(4) on i386/amd64

2013-03-04 Thread Gerhard Roth
On Mon, 4 Mar 2013 06:02:19 -0500 Matt Dainty m...@bodgit-n-scarper.com wrote: * Matt Dainty m...@bodgit-n-scarper.com [2013-02-20 19:30:43]: Attached are two patches for bios(4) on i386 amd64 that add support for detecting the comBIOS on Soekris hardware, which then fills in the hw.vendor

Re: Add Soekris comBIOS detection to bios(4) on i386/amd64

2013-03-04 Thread Gerhard Roth
On Mon, 4 Mar 2013 15:18:45 +0100 Gerhard Roth gerhard_r...@genua.de wrote: On Mon, 4 Mar 2013 06:02:19 -0500 Matt Dainty m...@bodgit-n-scarper.com wrote: * Matt Dainty m...@bodgit-n-scarper.com [2013-02-20 19:30:43]: Attached are two patches for bios(4) on i386 amd64 that add support

Re: [PATCH] snmpd readonly mode

2013-03-04 Thread Gerhard Roth
On Mon, 4 Mar 2013 15:56:36 +0100 Ilya Bakulin ilya_baku...@genua.de wrote: Hi list, We have a small issue with snmpd daemon in OpenBSD. If people use SNMPv2c, they should explicitly set read-write community name to some [probably random-generated] string, because otherwise everybody is

Re: [PATCH] snmpd readonly mode

2013-03-04 Thread Gerhard Roth
On Mon, 4 Mar 2013 17:28:17 +0100 Ilya Bakulin ilya_baku...@genua.de wrote: On Monday 04 March 2013 16:13:09 Gerhard Roth wrote: Just a little bike-shedding: - The term readonly seems more common to me than nowrite. I didn't use readonly because there is already a keyword read-only

Re: check for device_lookup result in vscsi

2013-05-10 Thread Gerhard Roth
Mike, but it does check in vscsiopen(). Hence no userland program should be able to call vscsiioctl() for a non-existant device because the open() already failed. At least that's true as long as vscsi devices can't disappear during run-time. Gerhard On Fri, 10 May 2013 14:44:39 +0200 Mike

dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an arbitrary amount of time, the value of cur_time might refer to some long ago point in time. When message dispatching is done, timeouts and lease ends

Re: dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
On Wed, 15 May 2013 10:15:54 +0200 Gerhard Roth gr...@genua.de wrote: In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an arbitrary amount of time, the value of cur_time might refer to some long

Re: dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
On Wed, 15 May 2013 10:24:22 +0200 Otto Moerbeek o...@drijf.net wrote: On Wed, May 15, 2013 at 10:15:54AM +0200, Gerhard Roth wrote: In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep

Re: cdce(4) and MBIM

2015-01-21 Thread Gerhard Roth
Hi Ingo, sorry to disappoint you, but that won't work. First of all, if_cdce.c doesn't do NCM encoding and second, even if it did this still wouldn't work because it just describes how data packets are encapsulated. But to talk to an MBIM device, you need a different set of control messages (e.g.

Fix for handling SNMP GETBULK Requests

2015-06-08 Thread Gerhard Roth
Hi, there's a bug in snmpd that breaks GETBULK requests for multiple OIDs. Example: # OID1=1.3.6.1.2.1.1.1 # OID2=1.3.6.1.2.1.31.1.1.1.1 # snmpbulkget -Cr3 -c public -v2c localhost $OID1 SNMPv2-MIB::sysDescr.0 = STRING: OpenBSD null 5.7 GENERIC#123 i386 SNMPv2-MIB::sysObjectID.0

Exclude invalid sensors from the sensors MIB

2015-11-17 Thread Gerhard Roth
Sensors marked as invalid should be excluded by snmpd(8) from the sensors MIB just as sysctl(8) excludes them from the 'hw.sensors' tree. Gerhard Index: usr.sbin/snmpd/mib.c === RCS file: /cvs/src/usr.sbin/snmpd/mib.c,v retrieving

snmpd loses ARP table information

2015-11-02 Thread Gerhard Roth
Hi, snmpd pernanently loses its ARP table information: # snmpctl walk 127.0.0.1 oid ipNetToMediaPhysAddress ipNetToMediaPhysAddress.2.192.168.16.1="xx:xx:xx:xx:xx:xx" ipNetToMediaPhysAddress.2.192.168.16.126="xx:xx:xx:xx:xx:xx"

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On Thu, 9 Jun 2016 16:19:14 +0100 Stuart Henderson <s...@spacehopper.org> wrote: > On 2016/06/09 15:29, Stuart Henderson wrote: > > On 2016/06/08 15:08, Gerhard Roth wrote: > > > I would be glad to hear from some people trying this with a real MBIM > > > device.

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On Thu, 9 Jun 2016 15:29:34 +0100 Stuart Henderson <s...@spacehopper.org> wrote: > On 2016/06/08 15:08, Gerhard Roth wrote: > > I would be glad to hear from some people trying this with a real MBIM > > device. > > So I have a Dell-branded Sierra MC8805, but

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On Thu, 9 Jun 2016 17:37:54 +0200 Gerhard Roth <gerhard_r...@genua.de> wrote: > On Thu, 9 Jun 2016 16:19:14 +0100 Stuart Henderson <s...@spacehopper.org> > wrote: > > On 2016/06/09 15:29, Stuart Henderson wrote: > > > On 2016/06/08 15:08, Gerhard Roth wrote: >

MBIM Patch (Round 3)

2016-06-08 Thread Gerhard Roth
Here comes the next version of the MBIM driver. Changes since last version: - incorporated suggestions from mpi@ - renamed to "umb" Only file "mbim.h" which contains MBIM protocol related stuff continues to use "mbim" as prefix. - No longer takes fake addresses nor does it try

Re: MBIM Patch (Round 2)

2016-06-07 Thread Gerhard Roth
On Mon, 6 Jun 2016 10:30:11 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 01/06/16(Wed) 17:20, Gerhard Roth wrote: > > [...] > > Thanks for all the feedback. > > More comments inline. Replies too. > >

Re: MBIM Patch (Round 2)

2016-06-08 Thread Gerhard Roth
On Tue, 7 Jun 2016 16:31:21 +0100 Stuart Henderson <s...@spacehopper.org> wrote: > On 2016/06/07 14:39, Gerhard Roth wrote: > > > > Now I get an IP address from my provider, I want something like this: > > > > > > > > inet 10.

Re: MBIM Patch (Round 2)

2016-06-08 Thread Gerhard Roth
On Wed, 8 Jun 2016 10:54:00 +0100 Stuart Henderson <s...@spacehopper.org> wrote: > On 2016/06/08 11:48, Gerhard Roth wrote: > > > > Currently I do this to get the interface up and running as my default > > route: > > > > # ifconfig umb0 pin apn xx

Re: MBIM Patch (Round 2)

2016-06-08 Thread Gerhard Roth
On Wed, 8 Jun 2016 11:31:41 +0100 Stuart Henderson <s...@spacehopper.org> wrote: > On 2016/06/08 11:59, Gerhard Roth wrote: > > On Wed, 8 Jun 2016 10:54:00 +0100 Stuart Henderson <s...@spacehopper.org> > > wrote: > > > On 2016/06/08 11:48, Gerhard Roth wr

Re: MBIM Patch (Round 2)

2016-06-07 Thread Gerhard Roth
On Tue, 7 Jun 2016 13:08:49 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 07/06/16(Tue) 11:53, Gerhard Roth wrote: > > On Mon, 6 Jun 2016 10:30:11 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > > > On 01/06/16(Wed) 17:20, Gerhard Roth wrote: > > > A

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On 09.06.2016 21:35, Bryan Vyhmeister wrote: On Wed, Jun 08, 2016 at 03:08:52PM +0200, Gerhard Roth wrote: I would be glad to hear from some people trying this with a real MBIM device. I have a Sierra Wireless EM7455 MBIM device that I purchased with my ThinkPad X260. I am very excited

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On 09.06.2016 19:04, Ingo Schwarze wrote: Hi Gerhard, Gerhard Roth wrote on Wed, Jun 08, 2016 at 03:08:52PM +0200: +.\" Copyright (c) 2016 genua mbH + * Copyright (c) 2016 genua mbH These kinds of Copyright notices without the name of the actual author are misleading. The pu

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On 09.06.2016 17:52, Gerhard Roth wrote: But: this payload is only 13 bytes but the length field says 14 bytes (0x0d). Studid me. Can't even read single digit hex values anymore :(

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On 09.06.2016 23:42, Mark Kettenis wrote: Date: Thu, 9 Jun 2016 22:59:28 +0200 (CEST) From: Mark Kettenis <mark.kette...@xs4all.nl> Date: Wed, 8 Jun 2016 15:08:52 +0200 From: Gerhard Roth <gerhard_r...@genua.de> I would be glad to hear from some people trying this with a real

Re: MBIM Patch (Round 3)

2016-06-09 Thread Gerhard Roth
On 10.06.2016 00:22, Stuart Henderson wrote: On 2016/06/10 00:10, Mark Kettenis wrote: From: Gerhard Roth <gerhard_r...@genua.de> Date: Thu, 9 Jun 2016 23:48:23 +0200 On 09.06.2016 23:42, Mark Kettenis wrote: Date: Thu, 9 Jun 2016 22:59:28 +0200 (CEST) From: Mark Kettenis <m

Re: MBIM Patch (Round 3)

2016-06-10 Thread Gerhard Roth
On 10.06.2016 05:09, Bryan Vyhmeister wrote: On Thu, Jun 09, 2016 at 10:31:58PM +0200, Gerhard Roth wrote: If that doesn't help, please set UMB_DEBUG and set umb_debug to 5. I left that break commented out which perhaps I shouldn't have but below is the output when I set an apn and bring umb0

Re: MBIM Patch - Part 1 of 4

2016-05-30 Thread Gerhard Roth
On Sat, 28 May 2016 09:18:13 +0200 Stefan Sperling <s...@stsp.name> wrote: > On Mon, May 23, 2016 at 03:37:32PM +0200, Gerhard Roth wrote: > > I have this stuff around quite a while now, but since patrick@ asked > > me repeatedly, I think it is time to share this now. >

Re: MBIM Patch (Round 2)

2016-06-01 Thread Gerhard Roth
On 01.06.2016 17:32, Theo de Raadt wrote: - renamed it from 'mbim' to 'umbim' I tried 'ubm' as proposed by Theo but that felt weird. Esp. when changing the prefixes of macros whose names were derived from the MBIM standard. I suggested that because ifconfig umbim0 ...

Re: MBIM Patch (Round 2)

2016-06-01 Thread Gerhard Roth
On 01.06.2016 20:28, Theo de Raadt wrote: As I said, we could still change the name of the interface to 'ubm' while keeping 'umbim' as the name of the driver. No, I don't understand the proposal. I think it should be ubm throughout, or I am threatening to rename ix(4) to a 8 character name.

Re: MBIM Patch - Part 2 of 4

2016-05-31 Thread Gerhard Roth
On Mon, 23 May 2016 17:47:28 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 23/05/16(Mon) 16:51, Gerhard Roth wrote: > > On Mon, 23 May 2016 16:18:29 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > > > On 23/05/16(Mon) 15:38, Gerhard Roth wrote: > >

Re: MBIM Patch - Part 2 of 4

2016-05-31 Thread Gerhard Roth
On Mon, 23 May 2016 17:47:28 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 23/05/16(Mon) 16:51, Gerhard Roth wrote: > > On Mon, 23 May 2016 16:18:29 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > > > On 23/05/16(Mon) 15:38, Gerhard Roth wrote: > > &

Re: MBIM Patch (Round 3)

2016-06-14 Thread Gerhard Roth
On 10.06.2016 14:41, Bryan Vyhmeister wrote: On Fri, Jun 10, 2016 at 09:43:36AM +0200, Gerhard Roth wrote: Hmm, I don't see the missing break. It is still stuck in the same state trying to turn on the radio and always getting non-confirmative resonses. If the break before "case UMB_S_

Re: umb(4) man page tweaks

2016-06-20 Thread Gerhard Roth
On Mon, 20 Jun 2016 08:50:05 +0200 Gerhard Roth <gerhard_r...@genua.de> wrote: > Hallo Stefan, > > danke, dass Du Dich darum kuemmerst. > > ok gerhard@ Sorry for the German. This mail was intended to go to Stefan only and not the mailing list. My mistake. Gerhard >

Re: umb(4) man page tweaks

2016-06-20 Thread Gerhard Roth
Hallo Stefan, danke, dass Du Dich darum kuemmerst. ok gerhard@ On Sun, 19 Jun 2016 15:03:13 +0200 Stefan Sperling wrote: > Some information in the umb(4) man page seems to be outdated (IPV4 gateway > handling), or doesn't really belong in a man page ("please hack the driver >

Re: MBIM Patch (Round 3)

2016-06-15 Thread Gerhard Roth
On 13.06.2016 12:52, Martin Pieuchot wrote: On 10/06/16(Fri) 21:09, Mark Kettenis wrote: Date: Fri, 10 Jun 2016 17:20:18 +0100 From: Stuart Henderson On 2016/06/10 16:05, Mark Kettenis wrote: In any case this is something we can figure out once the code hits the tree.

snmpd: some values need casting

2016-01-28 Thread Gerhard Roth
Hi, ber_add_integer() can ASN.1 encode integers of up to 64 bit. Yet for some types (e.g. SNMP_T_TIMETICKS, SNMP_T_GAUGE32, ..) the MIB says that the value must no exceed 2^32-1. We should cast the value to u_int32_t to avoid that e.g. Gauge32 carries a value larger than 32 bit. One special

Re: MBIM Patch - Part 1 of 4

2016-05-23 Thread Gerhard Roth
On Mon, 23 May 2016 15:54:36 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 23/05/16(Mon) 15:37, Gerhard Roth wrote: > > I have this stuff around quite a while now, but since patrick@ asked > > me repeatedly, I think it is time to share this now. > > > >

Re: MBIM Patch - Part 2 of 4

2016-05-23 Thread Gerhard Roth
On Mon, 23 May 2016 16:18:29 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 23/05/16(Mon) 15:38, Gerhard Roth wrote: > > This is part 2 of the MBIM patch. It adds the mbim driver to i386 > > Comments inline. Replies too. > > >

Re: MBIM Patch - Part 2 of 4

2016-05-23 Thread Gerhard Roth
On 23.05.2016 17:47, Martin Pieuchot wrote: On 23/05/16(Mon) 16:51, Gerhard Roth wrote: Why do you need to set a default route in the first place? Just like PPP this was designed as a point-to-point interface. The idea is that once you get an uplink, all traffic should be routed through

MBIM Patch - Part 2 of 4

2016-05-23 Thread Gerhard Roth
This is part 2 of the MBIM patch. It adds the mbim driver to i386 and amd64 kernels. Index: sys/arch/amd64/conf/GENERIC === RCS file: /cvs/src/sys/arch/amd64/conf/GENERIC,v retrieving revision 1.418 diff -u -p -u -p -r1.418 GENERIC

MBIM Patch - Part 3 of 4

2016-05-23 Thread Gerhard Roth
Part 3 of the MBIM patch updates ifconfig(8). Index: sbin/ifconfig/ifconfig.8 === RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v retrieving revision 1.267 diff -u -p -u -p -r1.267 ifconfig.8 --- sbin/ifconfig/ifconfig.86 Apr 2016

MBIM Patch - Part 1 of 4

2016-05-23 Thread Gerhard Roth
I have this stuff around quite a while now, but since patrick@ asked me repeatedly, I think it is time to share this now. This is a patch that adds support for the "Mobile Broadband Interface Model" (MBIM) from http://www.usb.org/. It allows to attach UMTS/LTE USB devices as a network interface.

MBIM Patch - Part 4 of 4

2016-05-23 Thread Gerhard Roth
This is the final patch for MBIM which adds a manual page for mbim(4). Index: share/man/man4/Makefile === RCS file: /cvs/src/share/man/man4/Makefile,v retrieving revision 1.621 diff -u -p -u -p -r1.621 Makefile ---

Re: umb: aggregate packets on tx

2017-02-20 Thread Gerhard Roth
On Mon, 12 Dec 2016 14:50:50 +0100 Gerhard Roth <gerhard_r...@genua.de> wrote: > The current umb(4) implementation needs one USB transfer for every packet > that is sent. With the following patch, we can now aggregate several > packets from the ifq into one single USB transfer. >

Re: [PATCH] umb(4) fixes for ifconfig

2016-11-10 Thread Gerhard Roth
> > The second part of the patch also fixes the last digit of the phone > > number and mulitple digits of the subscriber-id, ICC-id, and IMEI being > > cut off. Both fixes were discussed with Gerhard Roth. I sent him an > > original patch but it only partially solved the issues

umb: NCM datagram pointer entries

2016-11-14 Thread Gerhard Roth
Hi, according to the NCM spec, the list of datagram pointer entries has to be terminated with an entry where wDatagramIndex and wDatagramLen are zero. Not all implementations seem to follow that rule: otto@ had one that only sets the index to zero while using an arbitrary length value. The patch

umb string padding

2016-11-22 Thread Gerhard Roth
This patch fixes a bug in the padding of umb strings. Instead of padding the right position, umb_padding() would always zero padding bytes at the beginning of the buffer. For the two callers of umb_addstr(), this won't hurt in umb_send_connect() since the first value in the buffer is the session

FCC Auth patch for umb(4)

2016-11-16 Thread Gerhard Roth
Some MBIM devices need a FCC Authentication before they're willing to turn on the radio. This has to be done by sending a QMI command inside an MBIM message. This patch is based on an earlier patch by Stuart Henderson. One crucial thing was missing in sthen@'s patch: first a client-id (CID) has

Re: [PATCH] usbdevs for Sierra Wireless EM7455

2016-11-16 Thread Gerhard Roth
On Tue, 15 Nov 2016 08:11:01 -0800 Bryan Vyhmeister wrote: > This patch adds the Sierra Wireless EM7455 umb(4) device to usbdevs in > preparation for another patch to if_umb.c which adds full support for > the EM7455. > > Bryan > > > Index: sys/dev/usb/usbdevs >

umb: aggregate packets on tx

2016-12-12 Thread Gerhard Roth
The current umb(4) implementation needs one USB transfer for every packet that is sent. With the following patch, we can now aggregate several packets from the ifq into one single USB transfer. This may speed up the tx path. And even if it doesn't, at least it reduces the number of transfers

Re: snmpd: engine id is just a binary string?

2017-07-28 Thread Gerhard Roth
On Fri, 28 Jul 2017 12:39:48 + Florian Obser wrote: > Not sure about this one, a quick glance at RFC 3411 suggests this > is just a binary string, so uint8_t is more appropriate. > > Any snmp nerds around? > > clang complained about this: > >

Re: snmpd: format string for yyerror

2017-07-28 Thread Gerhard Roth
On Fri, 28 Jul 2017 12:36:22 + Florian Obser wrote: > not really a problem, errstr are just various static strings, but still... > > pointed out by clang, OK? > > diff --git snmpd/parse.y snmpd/parse.y > index efd1159c3ab..cc3d4194556 100644 > --- snmpd/parse.y > +++

Re: Standard conformance of strtol(3)

2017-07-06 Thread Gerhard Roth
On 06.07.2017 17:53, Todd C. Miller wrote: On Thu, 06 Jul 2017 07:37:19 -0600, "Todd C. Miller" wrote: glibc strtol() behavior: AIX FreeBSD GNU/Linux Solaris macOS SunOS 4.1.3 has the same behavior as Solaris. That's as far back as I care to go. - todd FWIW:

snmpd getbulk replies

2017-07-27 Thread Gerhard Roth
Hi, snmpd uses the same storage for sm_error and sm_nonrepeaters. Same applies to sm_errorindex and sm_maxrepetitions. If we produce a response PDU to a getbulk request, sm_error will carry the number of non-repeaters from the request and sm_errorindex the max. number of repetitions. This is

Re: snmpd getbulk replies

2017-07-27 Thread Gerhard Roth
On Thu, 27 Jul 2017 12:46:23 +0100 Stuart Henderson <s...@spacehopper.org> wrote: > On 2017/07/27 10:58, Gerhard Roth wrote: > > Hi, > > > > snmpd uses the same storage for sm_error and sm_nonrepeaters. Same applies > > to sm_errorindex and sm_maxrepetiti

Fix possible fault in sysctl_file()

2017-06-20 Thread Gerhard Roth
Hi, file pointer may be incompletely initialized after falloc(). For example, sys_socket() initializes 'f_flag', 'f_type', and 'f_ops' but may sleep then in socreate() before assigning 'f_data'. That is why there is the FIF_LARVAL flag, that is check by the macro FILE_IS_USABLE(). Of the three

Fix umb(4) on big-endian machines

2017-05-03 Thread Gerhard Roth
Hi, all MBIM values are in litte-endian encoding but somewhere in the fine print it reads that "the addresses will be in network byte order". So applying letoh32() on addresses is just plain wrong. On little-endian machines, we didn't notice since letoh32() is a no-op there. But one big-endian

Re: Routing table update on link state change

2017-09-04 Thread Gerhard Roth
Hi Martin, On Mon, 4 Sep 2017 14:18:50 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 04/09/17(Mon) 13:10, Gerhard Roth wrote: > > Hi, > > > > I noticed a problem with the routing table that is easy to reproduce: put > > multiple IPs on the same carp i

Routing table update on link state change

2017-09-04 Thread Gerhard Roth
Hi, I noticed a problem with the routing table that is easy to reproduce: put multiple IPs on the same carp interface: # ifconfig em0 em0: flags=8843 mtu 1500 lladdr 00:0a:e4:31:9d:6e index 1 priority 0 llprio 3 groups: egress

Re: Routing table update on link state change

2017-09-05 Thread Gerhard Roth
On Tue, 5 Sep 2017 10:47:11 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 04/09/17(Mon) 14:53, Gerhard Roth wrote: > > Hi Martin, > > > > > > On Mon, 4 Sep 2017 14:18:50 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > > > On 04/

umb(4): recover after temporary loss of packet service

2017-10-23 Thread Gerhard Roth
In case we have a temporary loss of connection in umb(4), the USB xfers may time-out. umb_txeof() should always check whether there are further mbufs in the if_snd queue; not only after successful transmits. Also, aborting the xfer in case the watchdog timer triggers, can help to resume from

Re: [patch] snmpd hrStorageSize negative values

2017-11-27 Thread Gerhard Roth
On Sat, 25 Nov 2017 11:42:07 -0700 Joel Knight wrote: > On Thu, Mar 9, 2017 at 10:02 PM, Joel Knight wrote: > > Hi. > > > > snmpd(8) uses unsigned ints internally to represent the size and used > > space of a file system. The HOST-RESOURCES-MIB

Re: Speed up snmpwalk

2018-05-22 Thread Gerhard Roth
On Tue, 22 May 2018 11:05:48 +0200 Claudio Jeker <cje...@diehard.n-r-g.com> wrote: > On Tue, May 22, 2018 at 10:26:30AM +0200, Gerhard Roth wrote: > > Hi, > > > > a snmpwalk of HOST-RESOURCES-MIB::hrSWRunTable doesn't scale very well > > with an incre

Speed up snmpwalk

2018-05-22 Thread Gerhard Roth
Hi, a snmpwalk of HOST-RESOURCES-MIB::hrSWRunTable doesn't scale very well with an increasing number of running processes. For every process and each of the 7 elements of the table, mib_hrswrun() would call kinfo_proc() which queried all the processes running on the system and sort them by pid.

Re: [patch] Add kvm_close in mib_hrsystemprocs function

2018-05-30 Thread Gerhard Roth
On Wed, 30 May 2018 16:25:55 +0800 Nan Xiao wrote: > Hi tech@, > > Maybe kvm_close is needed if kvm_getprocs returns NULL here? Sorry if I > am wrong, thanks! > > Index: mib.c > === > RCS file: /cvs/src/usr.sbin/snmpd/mib.c,v >

Re: [patch] Add kvm_close in mib_hrsystemprocs function

2018-06-04 Thread Gerhard Roth
On Thu, 31 May 2018 17:40:36 +0800 Nan Xiao wrote: > Hi Gerhard, > > Thanks for your reply! > > Yes, if no "kvm_close(kd);", there will be resource (memory, file > descriptor) leak. So hope you can commit it, thanks! > > > On 5/30/2018 4:49 PM, Gerhard R

Re: umsm(4) and umb(4) separate loading for the same composite USB modem device

2018-08-16 Thread Gerhard Roth
On Thu, 16 Aug 2018 13:56:13 +0300 Denis wrote: > I can change AT!UDUSBCOMP modes for MC7304 and MC7455 I have in production. > > But how to make full dump of all the USB device descriptors for each > UDUSBCOMP mode? Can I make it by usbdevs - or how? Hi Denis, no that won't work. You

Re: close filedescriptors of children

2018-03-08 Thread Gerhard Roth
If proc_init() knows about debug mode, we can move the call to daemon(3) into proc_init(). Then only the parent calls daemon(3). The children will inherit stdin/out/err from the parent and don't have to do anything. And since the children don't call daemon(3) themselves anymore, there won't be any

close filedescriptors of children

2018-03-07 Thread Gerhard Roth
Hi, proc_init() is done before daemon() and for the child processes of httpd, relayd and snmpd() this function never returns. That means that the children inherit stdin, stdout, and stderr of the caller and never close them. This fix this, proc_init() should map these filedes to /dev/null for a

Re: close filedescriptors of children

2018-03-07 Thread Gerhard Roth
Hi Benno, thanks for your reply. On Wed, 7 Mar 2018 15:22:28 +0100 Sebastian Benoit wrote: > Hi, > > switchd and vmd use the same proc.c,and should stay in sync. Ack. I missed them. > > Also, this breaks -dvv (i.e. debug output when running inthe foreground), > at least

Re: close filedescriptors of children

2018-03-07 Thread Gerhard Roth
On Wed, 7 Mar 2018 17:20:06 +0100 Mike Belopuhov <m...@belopuhov.com> wrote: > On 7 March 2018 at 17:01, Gerhard Roth <gerhard_r...@genua.de> wrote: > > > > Hi Benno, > > > > thanks for your reply. > > > > On Wed, 7 Mar 2018 15:22:28 +0100 Sebas

Bogus assertwaitok() in usb_block_allocmem()

2018-12-05 Thread Gerhard Roth
usb_block_allocmem() does not sleep and is careful to always use the BUS_DMA_NOWAIT flag. So why the assertwaitok()? Gerhard Index: sys/dev/usb/usb_mem.c === RCS file: /cvs/src/sys/dev/usb/usb_mem.c,v retrieving revision 1.31 diff

Re: if_umb.c: typos

2019-01-14 Thread Gerhard Roth
Hello Ingo, I must apologize for my sticky fingers and lots of copy & pasting :/ Thanks for finding. ok gerhard@ On Mon, 14 Jan 2019 14:21:37 +0100 Ingo Feinerer wrote: > A few messsage -> message fixes. > > Index: if_umb.c >

Re: Add SHA-2 support to snmpd [2/2] SHA-2/RFC7860

2019-06-07 Thread Gerhard Roth
On 6/7/19 10:45 AM, Martijn van Duren wrote: > On 6/7/19 10:41 AM, Gerhard Roth wrote: >> On 6/7/19 9:52 AM, Martijn van Duren wrote: >>> On 6/7/19 9:50 AM, Martijn van Duren wrote: >>>> Hello tech@, >>>> >>>> I managed to get SHA-2 support

Re: Add SHA-2 support to snmpd [1/2] Digest length is not always 12 bytes

2019-06-07 Thread Gerhard Roth
On 6/7/19 9:50 AM, Martijn van Duren wrote: > Hello tech@, > > I managed to get SHA-2 support working for snmpd, based on RFC7860 and > tested with net-snmp commandline tools. > > I split the diff up in 2 steps for readability. > Step 1: Don't assume the digestlength is always 12 bytes. This

Re: Add SHA-2 support to snmpd [2/2] SHA-2/RFC7860

2019-06-07 Thread Gerhard Roth
On 6/7/19 9:52 AM, Martijn van Duren wrote: > On 6/7/19 9:50 AM, Martijn van Duren wrote: >> Hello tech@, >> >> I managed to get SHA-2 support working for snmpd, based on RFC7860 and >> tested with net-snmp commandline tools. >> >> I split the diff up in 2 steps for readability. > Step 2:

fix xhci 'actlen' calculation

2019-11-12 Thread Gerhard Roth
Hi, xhci's calculation of 'xfer->actlen' is wrong if the xfer was split into multiple TRBs. That's because the code just looks at the remainder reported by the status TRB. However, this remainder only refers to the total size of this single TRB; not to the total size of the xfer. Example: assume

legacy sending of traps in snmpd

2019-12-09 Thread Gerhard Roth
Hi, any initialization of the form struct ber_oid trapoid = OID(MIB_snmpTrapOID); requires a smi_scalar_oidlen() afterwards to set 'bo_n' to the correct length. The old ber_oid_cmp() from usr.sbin/snmpd/ber.c used to iterate over all elements of 'bo_id' and not just the first 'bo_n'

Re: HID devices without numbered reports

2019-10-28 Thread Gerhard Roth
On Mon, 28 Oct 2019 15:41:34 +0100 Patrick Wildt wrote: > On Mon, Oct 28, 2019 at 03:14:22PM +1100, Damien Miller wrote: > > On Mon, 28 Oct 2019, Damien Miller wrote: > > > > > BTW, the token still becomes unresponsive after the first transaction, > > > but looking at a sniff (using an

  1   2   >