[Bug 270417] tcpdump does not capture any packets on lagg(4) interface when choosing receive direction

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 23 Mar 2023 08:10:01 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270417

            Bug ID: 270417
           Summary: tcpdump does not capture any packets on lagg(4)
                    interface when choosing receive direction
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: zlei@FreeBSD.org

Observed the problem while repeating
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240106#c28

A minimal script to repeat:

```
#!/bin/sh

epa=$( ifconfig epair create )
epb=${epa%a}b

lagg=$( ifconfig lagg create laggport $epa )

ifconfig $epa up
ifconfig $lagg up

j0=$( jail -ic vnet persist )
ifconfig $epb vnet $j0
jexec $j0 ifconfig $epb inet 192.168.1.2/24

tmp=$( mktemp )
nohup tcpdump -nvi $lagg --direction in > $tmp &

jexec $j0 ping -t5 -c3 192.168.1.1

kill $!

jail -R $j0
ifconfig $lagg destroy
ifconfig $epa destroy

cat $tmp
rm $tmp
```

The output:
==============
PING 192.168.1.1 (192.168.1.1): 56 data bytes

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
tcpdump: listening on lagg0, link-type EN10MB (Ethernet), capture size 262144
bytes

0 packets captured
0 packets received by filter
0 packets dropped by kernel

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