On Tue, 18 Feb 2020 12:11:05 +0000 Stuart Henderson <s...@spacehopper.org> 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); > > > > c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4); > > > > +#ifdef INET6 > > > > + /* XXX FIXME: support IPv6-only mode, too */ > > > > + if ((sc->sc_flags & UMBFLG_NO_INET6) == 0) > > > > + c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4V6); > > > > > > Is there a reason why MBIM_CONTEXT_IPTYPE_IPV4V6 is used and not > > > MBIM_CONTEXT_IPTYPE_IPV4ANDV6? > > > > > > 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 handling v6 in OpenBSD, shouldn't it disable v6 > unless the interface has a link-local configured? (So the usual method > to enable v6 and bring an interface up would be "inet6 eui64" and "up"). > That is how pppoe works.
Hi Stuart, you mean like that? Gerhard Index: sys/dev/usb/if_umb.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_umb.c,v retrieving revision 1.32 diff -u -p -u -p -r1.32 if_umb.c --- sys/dev/usb/if_umb.c 18 Feb 2020 08:09:37 -0000 1.32 +++ sys/dev/usb/if_umb.c 18 Feb 2020 12:35:45 -0000 @@ -2583,7 +2583,8 @@ umb_send_connect(struct umb_softc *sc, i c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4); #ifdef INET6 /* XXX FIXME: support IPv6-only mode, too */ - if ((sc->sc_flags & UMBFLG_NO_INET6) == 0) + if ((sc->sc_flags & UMBFLG_NO_INET6) == 0 && + in6ifa_ifpforlinklocal(GET_IFP(sc), 0) != NULL) c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4V6); #endif memcpy(c->context, umb_uuid_context_internet, sizeof (c->context));