[Bug 254345] cdce erroneously attaches to a combined RNDIS/CDCE Ethernet gadget

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Mar 16 19:12:57 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254345

            Bug ID: 254345
           Summary: cdce erroneously attaches to a combined RNDIS/CDCE
                    Ethernet gadget
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: usb
          Assignee: usb at FreeBSD.org
          Reporter: d8zNeCFG at aon.at

Created attachment 223335
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=223335&action=edit
files mentioned in the bug report

Scenario:
- Raspberry Pi B+
- FreeBSD main at 51dfae383bf6298af9e6d816a78b92b6f34d68be
- (Physically) attaching a combined RNDIS/CDCE Ethernet gadget: configuration 0
supports RNDIS, configuration 1 supports CDCE (see the attached output of
"usbconfig dump_all_desc"
- The current configuration is 0, see the attached output of "usbconfig
dump_curr_config_desc"
- devd with a default configuration plus a special configuration for a Huawei
4G modem is running; the special configuration matches this device (although it
really should not, but this is not the point of this PR); the special devd
configuration file is attached ("e3372.conf")

Result:
- Two ue interfaces are created, one attached to interface 0 of the RNDIS
device, the other to interface 1; see the attached output of "devinfo -rv"

Expected result:
- Since configuration 0 is active, only one network interface for the RNDIS
device should be created; this network interface must make use of the two USB
interfaces (0, 1, see above) of USB configuration 0 of the device, see
https://docs.microsoft.com/de-at/windows-hardware/drivers/network/overview
- The CDCE driver should not attach at all to this device as long as it is in
USB configuration 0.

Notes:
- I am not an expert here so my analysis may be wrong. :-)
- It is important not to mix the notions of "USB interface" and "network
interface" when checking this PR.
- There is a major issue with devd and the ue USB Ethernet interfaces because
the available information does not allow devd to determine which device it is
really dealing with. In this case, with e3372.conf a DHCP client is started on
all ue devices; but this is useless for the Ethernet gadget of this PR because
that needs to have a fixed IP address assigned which is impossible to achieve
with devd rules as long as the real E3372 offers a DHCP service.
- FreeBSD needs a way to distinguish interfaces by some hardware ID; most
likely the best way would be to create the device as ue-<HW Ethernet address>.
But this is not the main issue of this bug report; this bug report is about
CDCE erroneously attaching to the data interface of a USB RNDIS device.

-- Martin

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-usb mailing list