Re: IPv6 Support for umb(4)

2020-05-01 Thread Stuart Henderson
On 2020/05/01 20:10, Gerhard Roth wrote: > On 4/30/20 11:07 PM, Stuart Henderson wrote: > > On 2020/04/30 20:32, Gerhard Roth wrote: > > > Hi Theo, > > > > > > is umb really working that differently for a P2P interface? I think it is > > > very similar to ppp(4) and IPv6. The standard way is to ob

Re: IPv6 Support for umb(4)

2020-05-01 Thread Gerhard Roth
On 4/30/20 11:07 PM, Stuart Henderson wrote: On 2020/04/30 20:32, Gerhard Roth wrote: Hi Theo, is umb really working that differently for a P2P interface? I think it is very similar to ppp(4) and IPv6. The standard way is to obtain the IP address via PPP protocol. Just like this, umb(4) obtains

Re: IPv6 Support for umb(4)

2020-04-30 Thread Jason McIntyre
On Thu, Apr 30, 2020 at 03:33:56PM -0600, Theo de Raadt wrote: > Jason McIntyre wrote: > > > On Thu, Apr 30, 2020 at 10:07:14PM +0100, Stuart Henderson wrote: > > > > > > On 2020/04/30 20:52, Gerhard Roth wrote: > > > > It it too much to expect users to read the ifconfig man page? > > > > > > P

Re: IPv6 Support for umb(4)

2020-04-30 Thread Stuart Henderson
On 2020/04/30 22:28, Jason McIntyre wrote: > On Thu, Apr 30, 2020 at 10:07:14PM +0100, Stuart Henderson wrote: > > > > On 2020/04/30 20:52, Gerhard Roth wrote: > > > It it too much to expect users to read the ifconfig man page? > > > > Printed, it is 28 pages of A4. > > > > ouch. admittedly on

Re: IPv6 Support for umb(4)

2020-04-30 Thread Theo de Raadt
Jason McIntyre wrote: > On Thu, Apr 30, 2020 at 10:07:14PM +0100, Stuart Henderson wrote: > > > > On 2020/04/30 20:52, Gerhard Roth wrote: > > > It it too much to expect users to read the ifconfig man page? > > > > Printed, it is 28 pages of A4. > > > > ouch. > > > Compare with the wifi driv

Re: IPv6 Support for umb(4)

2020-04-30 Thread Jason McIntyre
On Thu, Apr 30, 2020 at 10:07:14PM +0100, Stuart Henderson wrote: > > On 2020/04/30 20:52, Gerhard Roth wrote: > > It it too much to expect users to read the ifconfig man page? > > Printed, it is 28 pages of A4. > ouch. > Compare with the wifi drivers, you have to look at ifconfig(8) if > you

Re: IPv6 Support for umb(4)

2020-04-30 Thread Stuart Henderson
On 2020/04/30 20:32, Gerhard Roth wrote: > Hi Theo, > > is umb really working that differently for a P2P interface? I think it is > very similar to ppp(4) and IPv6. The standard way is to obtain the IP > address via PPP protocol. Just like this, umb(4) obtains the IP address via > MBIM protocol.

Re: IPv6 Support for umb(4)

2020-04-30 Thread Gerhard Roth
On 4/30/20 8:04 PM, Theo de Raadt wrote: I also feel noone is going to read the manual page, find this piece of text, and understand it. Honestly, I don't understand this piece of text. I'm not going to set the AUTOCONF6 flag. How does one even set it? ifconfig: AUTOCONF6: bad value Of cours

Re: IPv6 Support for umb(4)

2020-04-30 Thread Gerhard Roth
Hi Theo, is umb really working that differently for a P2P interface? I think it is very similar to ppp(4) and IPv6. The standard way is to obtain the IP address via PPP protocol. Just like this, umb(4) obtains the IP address via MBIM protocol. That's what is implemented with this and former

Re: IPv6 Support for umb(4)

2020-04-30 Thread Theo de Raadt
I'm completely lost. I said it should work as much as a regular device does. I suggested the hardware always come up in software mode. And then, the driver fakes as if it is doing the inet6 stuff at the moment, whereas it is already done. So that the upper level network stack needs nothing diff

Re: IPv6 Support for umb(4)

2020-04-30 Thread Theo de Raadt
I don't know the answers. But if umb works differently it will suck. I also feel noone is going to read the manual page, find this piece of text, and understand it. Honestly, I don't understand this piece of text. I'm not going to set the AUTOCONF6 flag. How does one even set it? ifconfig: AU

Re: IPv6 Support for umb(4)

2020-04-30 Thread Gerhard Roth
On 4/30/20 4:03 PM, Theo de Raadt wrote: Is that still the true behaviour? I think it isn't, the "before up" aspect is gone isn't it? That's right for IP configuration via MBIM and I deleted the "before up" from the first sentence. But wasn't sure for the SLAAC case. Will autoconf work if I

Re: IPv6 Support for umb(4)

2020-04-30 Thread Theo de Raadt
Is that still the true behaviour? I think it isn't, the "before up" aspect is gone isn't it? +.Pp +To use IPv6, configure a link-local address. +If the device is able to connect to the ISP's network but doesn't +show an IPv6 address, setting the +.Sy AUTOCONF6 +flag on the interface before bring

Re: IPv6 Support for umb(4)

2020-04-30 Thread Gerhard Roth
On Mon, 27 Apr 2020 16:59:22 +0200 Gerhard Roth wrote: > On 4/27/20 4:53 PM, Theo de Raadt wrote: > > Gerhard Roth wrote: > > > >> Hi Theo, > >> > >> On 4/27/20 4:39 PM, Theo de Raadt wrote: > >>> Is this code in umb_decode_ip_configuration() reached again, if > >>> you do a late ifconfig (

Re: IPv6 Support for umb(4)

2020-04-27 Thread Gerhard Roth
On 4/27/20 4:53 PM, Theo de Raadt wrote: Gerhard Roth wrote: Hi Theo, On 4/27/20 4:39 PM, Theo de Raadt wrote: Is this code in umb_decode_ip_configuration() reached again, if you do a late ifconfig (don't set inet6 at up time, but set it later) no, seting inet6 later doesn't work. On MBIM

Re: IPv6 Support for umb(4)

2020-04-27 Thread Theo de Raadt
Gerhard Roth wrote: > Hi Theo, > > On 4/27/20 4:39 PM, Theo de Raadt wrote: > > Is this code in umb_decode_ip_configuration() reached again, if > > you do a late ifconfig (don't set inet6 at up time, but set it > > later) > > no, seting inet6 later doesn't work. On MBIM level I have to tell the

Re: IPv6 Support for umb(4)

2020-04-27 Thread Gerhard Roth
Hi Theo, On 4/27/20 4:39 PM, Theo de Raadt wrote: Is this code in umb_decode_ip_configuration() reached again, if you do a late ifconfig (don't set inet6 at up time, but set it later) no, seting inet6 later doesn't work. On MBIM level I have to tell the device *before* the CONNECT whether I w

Re: IPv6 Support for umb(4)

2020-04-27 Thread Theo de Raadt
Is this code in umb_decode_ip_configuration() reached again, if you do a late ifconfig (don't set inet6 at up time, but set it later) That is how other network interfaces work. I'm trying to make sure this behaviour isn't too weird (ie. requiring a down, then up). Gerhard Roth wrote: > And sin

Re: IPv6 Support for umb(4)

2020-04-27 Thread Gerhard Roth
And since IPv6 is now optional for umb(4), we can just skip evaluation of the IPv6 part of the IP configuration, if it wasn't enabled. Gerhard Index: sys/dev/usb/if_umb.c === RCS file: /cvs/src/sys/dev/usb/if_umb.c,v retrieving revi

Re: IPv6 Support for umb(4)

2020-04-27 Thread Gerhard Roth
Hello Claudio, On Mon, 27 Apr 2020 11:51:50 +0200 Claudio Jeker wrote: > On Mon, Apr 27, 2020 at 10:26:01AM +0200, Gerhard Roth wrote: > > Should we change umb(4) so that it only grabs an IPv6 address > > in case somebody does a "ifconfig umb0 inet6 eui64" first? > > > > Anyone willing to ok th

Re: IPv6 Support for umb(4)

2020-04-27 Thread Claudio Jeker
On Mon, Apr 27, 2020 at 10:26:01AM +0200, Gerhard Roth wrote: > Should we change umb(4) so that it only grabs an IPv6 address > in case somebody does a "ifconfig umb0 inet6 eui64" first? > > Anyone willing to ok the patch below? see below > On 2/19/20 9:19 AM, Gerhard Roth wrote: > > On Wed, 19

Re: IPv6 Support for umb(4)

2020-04-27 Thread Gerhard Roth
Should we change umb(4) so that it only grabs an IPv6 address in case somebody does a "ifconfig umb0 inet6 eui64" first? Anyone willing to ok the patch below? On 2/19/20 9:19 AM, Gerhard Roth wrote: On Wed, 19 Feb 2020 08:45:39 +0100 Claudio Jeker wrote: On Tue, Feb 18, 2020 at 11:16:54PM

Re: IPv6 Support for umb(4)

2020-02-19 Thread Gerhard Roth
On Wed, 19 Feb 2020 08:45:39 +0100 Claudio Jeker wrote: > On Tue, Feb 18, 2020 at 11:16:54PM +, Stuart Henderson wrote: > > On 2020/02/18 13:40, Gerhard Roth wrote: > > > > > Yes, I tried MBIM_CONTEXT_IPTYPE_IPV4ANDV6 myself first but to no > > > > > avail. The switched to MBIM_CONTEXT_IPTY

Re: IPv6 Support for umb(4)

2020-02-18 Thread Claudio Jeker
On Tue, Feb 18, 2020 at 11:16:54PM +, Stuart Henderson wrote: > On 2020/02/18 13:40, Gerhard Roth wrote: > > > > Yes, I tried MBIM_CONTEXT_IPTYPE_IPV4ANDV6 myself first but to no > > > > avail. The switched to MBIM_CONTEXT_IPTYPE_IPV4V6 and everything > > > > was fine. > > > > > > Obviously

Re: IPv6 Support for umb(4)

2020-02-18 Thread Stuart Henderson
On 2020/02/18 13:40, Gerhard Roth wrote: > > > Yes, I tried MBIM_CONTEXT_IPTYPE_IPV4ANDV6 myself first but to no > > > avail. The switched to MBIM_CONTEXT_IPTYPE_IPV4V6 and everything > > > was fine. > > > > Obviously it needs to switch based on INET6, but with the current > > mechanism used for

Re: IPv6 Support for umb(4)

2020-02-18 Thread Gerhard Roth
On Tue, 18 Feb 2020 12:11:05 + Stuart Henderson wrote: > On 2020/02/18 08:25, Gerhard Roth wrote: > > > > @@ -2393,6 +2581,11 @@ umb_send_connect(struct umb_softc *sc, i > > > > c->authprot = htole32(MBIM_AUTHPROT_NONE); > > > > c->compression = htole32(MBIM_COMPRESSION_NONE);

Re: IPv6 Support for umb(4)

2020-02-18 Thread Stuart Henderson
On 2020/02/18 08:25, Gerhard Roth wrote: > > > @@ -2393,6 +2581,11 @@ umb_send_connect(struct umb_softc *sc, i > > > c->authprot = htole32(MBIM_AUTHPROT_NONE); > > > c->compression = htole32(MBIM_COMPRESSION_NONE); > > > c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4); > > > +#ifdef INET6 > > >

Re: IPv6 Support for umb(4)

2020-02-17 Thread Claudio Jeker
On Tue, Feb 18, 2020 at 08:25:48AM +0100, Gerhard Roth wrote: > Hi Claudio, > > thanks for looking at it. > > For your questions find my replies below. > Thanks. Bummer about not knowing what the cause of no IPv6 config is. I guess it is time to get this in an have people play with it. > > On

Re: IPv6 Support for umb(4)

2020-02-17 Thread Gerhard Roth
Hi Claudio, thanks for looking at it. For your questions find my replies below. On Mon, 17 Feb 2020 17:30:03 +0100 Claudio Jeker wrote: > On Tue, Feb 04, 2020 at 09:16:34AM +0100, Gerhard Roth wrote: > > Hi Alex, > > > > thanks for looking into it. > > > > > > On Tue, 4 Feb 2020 00:20:42 +

Re: IPv6 Support for umb(4)

2020-02-17 Thread Claudio Jeker
On Tue, Feb 04, 2020 at 09:16:34AM +0100, Gerhard Roth wrote: > Hi Alex, > > thanks for looking into it. > > > On Tue, 4 Feb 2020 00:20:42 +0100 Alexander Bluhm > wrote: > > On Tue, Jan 28, 2020 at 03:03:47PM +0100, Gerhard Roth wrote: > > > this patch adds IPv6 support to umb(4). > > > > I

Re: IPv6 Support for umb(4)

2020-02-04 Thread Alexander Bluhm
On Tue, Feb 04, 2020 at 09:16:34AM +0100, Gerhard Roth wrote: > The updated patch below introduces a UMBFLG_NO_INET6 which is set on > receipt of a MBIM_STATUS_NO_DEVICE_SUPPORT in response to a > MBIM_CID_CONNECT. The code will then retry the connect operation in > IPv4-only mode. > > That won't g

Re: IPv6 Support for umb(4)

2020-02-04 Thread Gerhard Roth
Hi Alex, thanks for looking into it. On Tue, 4 Feb 2020 00:20:42 +0100 Alexander Bluhm wrote: > On Tue, Jan 28, 2020 at 03:03:47PM +0100, Gerhard Roth wrote: > > this patch adds IPv6 support to umb(4). > > It breaks my IPv4 setup. > > umb0 at uhub0 port 4 configuration 1 interface 6 "Lenov

Re: IPv6 Support for umb(4)

2020-02-03 Thread Alexander Bluhm
On Tue, Jan 28, 2020 at 03:03:47PM +0100, Gerhard Roth wrote: > this patch adds IPv6 support to umb(4). It breaks my IPv4 setup. umb0 at uhub0 port 4 configuration 1 interface 6 "Lenovo H5321 gw" rev 2.00/0.00 addr 2 provider Vodafone.de firmware CXP 901 8700/1 - R3C18 When I apply the diff, my

Re: IPv6 Support for umb(4)

2020-02-03 Thread Gerhard Roth
So far I've got only one ok from job@ and he'd like me to commit this. So I asking if there are any objections against this going into the base. Gerhard On Tue, 28 Jan 2020 15:03:47 +0100 Gerhard Roth wrote: > Hi, > > this patch adds IPv6 support to umb(4). > > It will try to obtain a IPv6

Re: IPv6 Support for umb(4)

2020-01-29 Thread Job Snijders
On Tue, Jan 28, 2020 at 03:03:47PM +0100, Gerhard Roth wrote: > this patch adds IPv6 support to umb(4). OK job@ Tested with 'telnet -6 towel.blinkenlights.nl' on Fibocom L831-EAU on IIJ MIO's network (Japan), with 'inet6 autoconf' in /etc/hostname.umb0 :-) job@vurt ~$ doas ifconfig umb0 umb0: fl

IPv6 Support for umb(4)

2020-01-28 Thread Gerhard Roth
Hi, this patch adds IPv6 support to umb(4). It will try to obtain a IPv6 address if the kernel is compiled with INET6. Currently there is no option to disable IPv6 on such a kernel (other than manually calling "ifconfig umb0 -inet6"). Nor is there a IPv6-only mode which refrains from obtaining an