From owner-freebsd-usb@freebsd.org Sat May 2 12:24:38 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAABA2CEA86 for ; Sat, 2 May 2020 12:24:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49DpGG5fF6z48Hj for ; Sat, 2 May 2020 12:24:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id C012B2CEA85; Sat, 2 May 2020 12:24:38 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFD7C2CEA84 for ; Sat, 2 May 2020 12:24:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49DpGG4zqyz48Hh for ; Sat, 2 May 2020 12:24:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A68DC21A3C for ; Sat, 2 May 2020 12:24:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 042COcpn001293 for ; Sat, 2 May 2020 12:24:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 042COcRh001292 for usb@FreeBSD.org; Sat, 2 May 2020 12:24:38 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 246108] ue0 (ASIX Elec. Corp. AX88178) does not capture packets in promisc mode w/o IP address assigned Date: Sat, 02 May 2020 12:24:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tomek@cedro.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2020 12:24:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246108 Tomasz "CeDeROM" CEDRO changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomek@cedro.info --- Comment #2 from Tomasz "CeDeROM" CEDRO --- Hello world :-) The problem seems to be with IF UP and IF IP assignment: * Onboard Ethernet can tcpdump after ifconfig up (no IP assigned). * USB Ethernet needs to have IP assigned in addition to ifconfig up to tcpd= ump. * Setting ifconfig em/ue ip also brings the interface up without "up" parameter!!! root@0xCFMX4:~ # uname -a FreeBSD 0xCFMX4 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 GENERIC amd64 1. Onboard Intel - looks like it needs to be only up, no IP assigned tcpdum= ps packets. root@0xCFMX4:~ # dmesg|grep em0 em0: port 0xf080-0xf09f mem 0xf7300000-0xf731ffff,0xf7344000-0xf7344fff irq 20 at device 25.0 on pci0 em0: Using 1024 TX descriptors and 1024 RX descriptors em0: Using an MSI interrupt em0: Ethernet address: XXX em0: netmap queues/slots: TX 1/1024, RX 1/1024 em0: link state changed to UP em0: link state changed to DOWN em0: link state changed to UP root@0xCFMX4:~ # ifconfig em0 down delete root@0xCFMX4:~ # ifconfig em0 em0: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D81249b ether XXX inet6 XXX%em0 prefixlen 64 tentative scopeid 0x1 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D21 root@0xCFMX4:~ # tcpdump -ni em0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig em0 1.2.3.4 up root@0xCFMX4:~ # tcpdump -ni em0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes 13:37:29.046739 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id 8000.XXX.8007, length 43 13:37:29.896857 IP XXX.5678 > 255.255.255.255.5678: UDP, length 120 13:37:29.896867 CDPv1, ttl: 120s, Device-ID 'XXX', length 87 13:37:29.896868 LLDP, length 105: XXX ^C 4 packets captured 4 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig em0 down delete root@0xCFMX4:~ # tcpdump -ni em0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig em0 up root@0xCFMX4:~ # ifconfig em0 em0: flags=3D8843 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D81249b ether XXX inet6 XXX%em0 prefixlen 64 scopeid 0x1 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D21 root@0xCFMX4:~ # tcpdump -ni em0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes 13:38:53.971397 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 8000.XXX.8007, length 43 13:38:55.972179 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 8000.XXX.8007, length 43 ^C 2 packets captured 2 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig em0 down delete ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address root@0xCFMX4:~ # tcpdump -ni em0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig em0 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni em0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes 14:16:44.987838 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id 8000.XXX.8007, length 43 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig em0 em0: flags=3D8843 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D81249b ether XXX inet6 XXX%em0 prefixlen 64 scopeid 0x1 inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D21 2. USB RTL driver GigaBit UNITEK 3xUSB3.0 HUB + GBE - needs an IP to tcpdum= p. root@0xCFMX4:~ # usbconfig (..) ugen0.9: at usbus0, cfg=3D0 md=3DHOST spd=3DSU= PER (5.0Gbps) pwr=3DSAVE (0mA) ugen0.10: at usbus0, cfg=3D0 md=3DHOST spd=3D= SUPER (5.0Gbps) pwr=3DON (72mA) root@0xCFMX4:~ # dmesg|grep ue0 ue0: on ure0 ue0: Ethernet address: XXX ue0: link state changed to DOWN ue0: link state changed to UP root@0xCFMX4:~ # ifconfig ue0 down delete root@0xCFMX4:~ # ifconfig ue0 ue0: flags=3D8802 metric 0 mtu 1500 options=3D80000 ether XXX media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 root@0xCFMX4:~ # tcpdump -ni ue0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue0 1.2.3.4 up root@0xCFMX4:~ # tcpdump -ni ue0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes 13:47:02.430378 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 8000.XXX.8008, length 43 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue0 down delete root@0xCFMX4:~ # ifconfig ue0 up root@0xCFMX4:~ # tcpdump -ni ue0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue0 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni ue0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes 13:47:56.477440 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 8000.XXX.8008, length 43 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue0 down delete root@0xCFMX4:~ # ifconfig ue0 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni ue0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes 14:03:26.008995 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id 8000.XXX.8008, length 43 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue0 ue0: flags=3D8843 metric 0 mtu 1500 options=3D80000 ether XXX inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 3. USB GBE AXGE "Manhattan USB 3.0 Gigabit Ethernet Adapter" - also needs I= P to tcpdump. root@0xCFMX4:~ # usbconfig (..) ugen0.11: at usbus0, cfg=3D0 md=3DHOST spd=3DSUP= ER (5.0Gbps) pwr=3DON (124mA) root@0xCFMX4:~ # dmesg|grep ue1 ue1: on axge0 ue1: Ethernet address: XXX ue1: link state changed to DOWN root@0xCFMX4:~ # ifconfig ue1 down delete ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 1.2.3.4 up root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes 13:54:09.022119 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id 8000.XXX.8008, length 47 13:54:10.573592 IP XXX.5678 > 255.255.255.255.5678: UDP, length 120 13:54:10.573601 CDPv1, ttl: 120s, Device-ID 'XXX'[|cdp] 13:54:10.573602 LLDP, length 109: XXX 13:54:10.845218 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id 8000.XXX.8008, length 47 ^C 5 packets captured 5 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 down delete root@0xCFMX4:~ # ifconfig ue1 up root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes ^V^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes 13:55:34.931786 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 8000.XXX.8008, length 47 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 down delete root@0xCFMX4:~ # ifconfig ue1 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes 14:01:42.011043 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id 8000.XXX.8008, length 47 14:01:42.140449 IP XXX.5678 > 255.255.255.255.5678: UDP, length 120 14:01:42.140459 CDPv1, ttl: 120s, Device-ID 'XXX'[|cdp] 14:01:42.140459 LLDP, length 109: XXX ^C 4 packets captured 4 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 ue1: flags=3D8843 metric 0 mtu 1500 options=3D8000b ether XXX inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 4. USB ASX "UNITEK USB2.0 GigaBit LAN" - also needs to have IP assigned to tcpdump. root@0xCFMX4:~ # usbconfig (..) ugen0.11: at usbus0, cfg=3D0 md=3DHOST spd=3DHIGH (480Mbps) pwr=3DON (250mA) root@0xCFMX4:~ # ifconfig ue1 down delete ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address root@0xCFMX4:~ # ifconfig ue1 ue1: flags=3D8802 metric 0 mtu 1500 options=3D80008 ether XXX media: Ethernet autoselect (10baseT/UTP ) status: active nd6 options=3D29 root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 1.2.3.4 up root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes 14:08:10.001078 STP 802.1w, Rapid STP, Flags [none], bridge-id 8000.XXX.800= 8, length 43 14:08:10.110409 IP XXX > 255.255.255.255.5678: UDP, length 120 14:08:10.110665 CDPv1, ttl: 120s, Device-ID 'XXX', length 87 14:08:10.110669 LLDP, length 105: XXX ^C 4 packets captured 4 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 down delete root@0xCFMX4:~ # ifconfig ue1 up ^[[A^[[Aroot@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes 14:09:27.744604 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 8000.XXX.8008, length 43 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 down delete root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 1.2.3.4 root@0xCFMX4:~ # tcpdump -ni ue1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes 14:10:25.127034 IP XXX > 255.255.255.255.5678: UDP, length 120 14:10:25.127276 CDPv1, ttl: 120s, Device-ID 'XXX', length 87 14:10:25.127278 LLDP, length 105: XXX ^C 3 packets captured 3 packets received by filter 0 packets dropped by kernel root@0xCFMX4:~ # ifconfig ue1 ue1: flags=3D8843 metric 0 mtu 1500 options=3D80008 ether XXX inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 --=20 You are receiving this mail because: You are the assignee for the bug.=