Re: MBIM Patch (Round 2)

2016-06-08 Thread Gerhard Roth
On Wed, 8 Jun 2016 10:35:11 +0100 Stuart Henderson wrote: > On 2016/06/08 09:54, Gerhard Roth wrote: > > On Tue, 7 Jun 2016 16:31:21 +0100 Stuart Henderson > > wrote: > > > On 2016/06/07 14:39, Gerhard Roth wrote: > > > > > > Now I get an IP addre

Re: MBIM Patch (Round 2)

2016-06-08 Thread Gerhard Roth
On Wed, 8 Jun 2016 10:54:00 +0100 Stuart Henderson 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 > >

Re: MBIM Patch (Round 2)

2016-06-08 Thread Gerhard Roth
On Tue, 7 Jun 2016 16:31:21 +0100 Stuart Henderson 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.75.178.41 --> 10.75.178.42 netmask

Re: MBIM Patch (Round 2)

2016-06-07 Thread Gerhard Roth
On Tue, 7 Jun 2016 13:08:49 +0200 Martin Pieuchot wrote: > On 07/06/16(Tue) 11:53, Gerhard Roth wrote: > > On Mon, 6 Jun 2016 10:30:11 +0200 Martin Pieuchot wrote: > > > On 01/06/16(Wed) 17:20, Gerhard Roth wrote: > > > Any reason for using a different licen

Re: MBIM Patch (Round 2)

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

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 (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 ...

MBIM Patch (Round 2)

2016-06-01 Thread Gerhard Roth
Hi, so here is an updated version of the MBIM patch (this time as one single patch). This is what has changed since the first version: - 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

Re: MBIM Patch - Part 2 of 4

2016-05-31 Thread Gerhard Roth
On Mon, 23 May 2016 17:47:28 +0200 Martin Pieuchot wrote: > On 23/05/16(Mon) 16:51, Gerhard Roth wrote: > > On Mon, 23 May 2016 16:18:29 +0200 Martin Pieuchot wrote: > > > On 23/05/16(Mon) 15:38, Gerhard Roth wrote: > > > > > > This is crazy :) No dri

Re: MBIM Patch - Part 2 of 4

2016-05-31 Thread Gerhard Roth
On Mon, 23 May 2016 17:47:28 +0200 Martin Pieuchot wrote: > On 23/05/16(Mon) 16:51, Gerhard Roth wrote: > > On Mon, 23 May 2016 16:18:29 +0200 Martin Pieuchot wrote: > > > On 23/05/16(Mon) 15:38, Gerhard Roth wrote: > > > > This is part 2 of the MBIM patch. I

Re: MBIM Patch - Part 1 of 4

2016-05-30 Thread Gerhard Roth
On Sat, 28 May 2016 11:19:18 +0100 Stuart Henderson wrote: > On 2016/05/28 09:18, Stefan Sperling wrote: > > Could mbim in theory support IPv6? > > The MBIM spec allows for it. > > > Don't worry about breaking existing umsm(4) setups. > > Since this driver provides a much simpler user interface

Re: MBIM Patch - Part 1 of 4

2016-05-30 Thread Gerhard Roth
On Sat, 28 May 2016 09:18:13 +0200 Stefan Sperling 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. > > > > This i

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 it

Re: MBIM Patch - Part 2 of 4

2016-05-23 Thread Gerhard Roth
On Mon, 23 May 2016 16:18:29 +0200 Martin Pieuchot 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. > > > Inde

Re: MBIM Patch - Part 1 of 4

2016-05-23 Thread Gerhard Roth
On Mon, 23 May 2016 15:54:36 +0200 Martin Pieuchot 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. > > > > This is a patch that a

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 --- share/man/man4/Mak

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 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 -

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 thing

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 r

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" ipNetToMediaPhysAddress.2.192.168.19.

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 =

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.

Re: run(4) firmware update; please test

2014-05-16 Thread Gerhard Roth
On Fri, 16 May 2014 13:07:24 +0200 Stefan Sperling 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), RF

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 =

Fw: SNMPv3 engine id discovery

2013-09-08 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 To: Subject: SNMPv3 engine id discovery Hi, in SNMPv3 engine id discovery is done by sending a noAuthNoPriv request to the SNMP agent. The agent should reply with a

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 usmStatsUnsupportedSecLevel

Re: dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
On Wed, 15 May 2013 10:24:22 +0200 Otto Moerbeek 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) > > ma

Re: dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
On Wed, 15 May 2013 10:15:54 +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 for an arbitrary amount of time, the value of cur_time > might refer to some long

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 a

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 Belop

Re: Let Geode-based systems restart automatically after power failure

2013-03-13 Thread Gerhard Roth
Miod, the Soerkis 5501 doesn't have any power switch. If automatic power on mode wouldn't have been enabled for them by default, any power failure would've bricked them. Gerhard On Tue, 12 Mar 2013 21:50:57 + Miod Vallat wrote: > The Geode companion chip, part of which attaches as glxpcib(4

Re: [PATCH] snmpd readonly mode

2013-03-04 Thread Gerhard Roth
On Mon, 4 Mar 2013 17:28:17 +0100 Ilya Bakulin 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"

Re: [PATCH] snmpd readonly mode

2013-03-04 Thread Gerhard Roth
On Mon, 4 Mar 2013 15:56:36 +0100 Ilya Bakulin 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 > able to alter valu

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 wrote: > On Mon, 4 Mar 2013 06:02:19 -0500 Matt Dainty > wrote: > > * Matt Dainty [2013-02-20 19:30:43]: > > > Attached are two patches for bios(4) on i386 & amd64 that add support > > > for detecting the comBI

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 wrote: > * Matt Dainty [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 & hw.product sysctl variables as this hard

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

2012-12-10 Thread Gerhard Roth
On Sun, 09 Dec 2012 00:26:35 +0100 Ariane van der Steldt wrote: > On 11/09/12 08:56, Gerhard Roth wrote: > > On Thu, 08 Nov 2012 16:22:41 -0500 > > Ted Unangst wrote: > >> On Thu, Nov 08, 2012 at 13:34, Ilya Bakulin wrote: > >> > >>> The problem s

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 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 at best q

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 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 mapped memo

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-08 Thread Gerhard Roth
I did a similar change recently (http://marc.info/?l=openbsd-cvs&m=135055003602935&w=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

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 sp

Re: DNS options for sppp(4)

2012-10-25 Thread Gerhard Roth
On 10/25/2012 09:53 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 sp

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 use

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() (!IFM_ACTIVE)

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: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX

Re: SNMPv3 Support

2012-07-19 Thread Gerhard Roth
Hi Reyk, On Wed, 18 Jul 2012 21:42:34 +0200, Reyk Floeter 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 it's a reserv

Re: SNMPv3 Support

2012-07-18 Thread Gerhard Roth
On Wed, 18 Jul 2012 16:51:27 +0200, Mike Belopuhov 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&

Re: SNMPv3 Support

2012-07-17 Thread Gerhard Roth
On Tue, 17 Jul 2012 11:21:04 +0200, Gerhard Roth 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 be

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 trans

Re: IP Routing Fix

2012-06-27 Thread Gerhard Roth
On Tue, 26 Jun 2012 08:38:29 +0200, Claudio Jeker wrote: On Fri, Jun 22, 2012 at 12:03:41PM +0200, Gerhard Roth wrote: 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

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

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 recon

Re: Memory leak in snmpd(8)

2012-05-24 Thread Gerhard Roth
On Thu, 24 May 2012 16:16:02 +0200, Kenneth R Westerback 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 --- mib.c 2012/03/20

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, st

<    1   2