Date: Sat, 02 May 2020 12:24:38 +0000 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 Message-ID: <bug-246108-19105-2r7rcG6RUZ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-246108-19105@https.bugs.freebsd.org/bugzilla/> References: <bug-246108-19105@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246108 Tomasz "CeDeROM" CEDRO <tomek@cedro.info> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomek@cedro.info --- Comment #2 from Tomasz "CeDeROM" CEDRO <tomek@cedro.info> --- 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: <Intel(R) PRO/1000 Network Connection> 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<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_= MAGIC,VLAN_HWFILTER> ether XXX inet6 XXX%em0 prefixlen 64 tentative scopeid 0x1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_= MAGIC,VLAN_HWFILTER> ether XXX inet6 XXX%em0 prefixlen 64 scopeid 0x1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_= MAGIC,VLAN_HWFILTER> 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 <full-duplex>) status: active nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> 2. USB RTL driver GigaBit UNITEK 3xUSB3.0 HUB + GBE - needs an IP to tcpdum= p. root@0xCFMX4:~ # usbconfig (..) ugen0.9: <Generic 4-Port USB 3.0 Hub> at usbus0, cfg=3D0 md=3DHOST spd=3DSU= PER (5.0Gbps) pwr=3DSAVE (0mA) ugen0.10: <Realtek USB 10/100/1000 LAN> at usbus0, cfg=3D0 md=3DHOST spd=3D= SUPER (5.0Gbps) pwr=3DON (72mA) root@0xCFMX4:~ # dmesg|grep ue0 ue0: <USB Ethernet> 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<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80000<LINKSTATE> ether XXX media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80000<LINKSTATE> ether XXX inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> 3. USB GBE AXGE "Manhattan USB 3.0 Gigabit Ethernet Adapter" - also needs I= P to tcpdump. root@0xCFMX4:~ # usbconfig (..) ugen0.11: <ASIX Elec. Corp. AX88179> at usbus0, cfg=3D0 md=3DHOST spd=3DSUP= ER (5.0Gbps) pwr=3DON (124mA) root@0xCFMX4:~ # dmesg|grep ue1 ue1: <USB Ethernet> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE> ether XXX inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> 4. USB ASX "UNITEK USB2.0 GigaBit LAN" - also needs to have IP assigned to tcpdump. root@0xCFMX4:~ # usbconfig (..) ugen0.11: <ASIX Elec. Corp. AX88178> 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<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80008<VLAN_MTU,LINKSTATE> ether XXX media: Ethernet autoselect (10baseT/UTP <half-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80008<VLAN_MTU,LINKSTATE> ether XXX inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246108-19105-2r7rcG6RUZ>