[Bug 187835] ngctl(8) strange behavior when adding more than 530 vlan through netgraph

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Feb 20 16:30:02 UTC 2020


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

--- Comment #10 from Vladislav V. Prodan <admin at support.od.ua> ---
(In reply to Aleksandr Fedorov from comment #6)

Yes, thank you.

On FreeBsd 12.1, with kern.ipc.maxsockbuf = 83886080 and adding 564 vlan, we
get the binary format:

# ngctl msg em2:lower gettable |more
Rec'd response 3 from "[b]:":
0000:  34 02 00 00 76 6c 61 6e 31 30 30 00 00 00 00 00  4...vlan100.....
0010:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0020:  00 00 00 00 64 00 64 00 00 00 76 6c 61 6e 31 30  ....d.d...vlan10
0030:  31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  1...............
0040:  00 00 00 00 00 00 00 00 00 00 65 00 65 00 00 00  ..........e.e...
0050:  76 6c 61 6e 31 30 32 00 00 00 00 00 00 00 00 00  vlan102.........
0060:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0070:  66 00 66 00 00 00 76 6c 61 6e 31 30 33 00 00 00  f.f...vlan103...
...

Further, after a sequence of commands leads to a kernel panic.

# delete all freshly created vlans
ngctl list | awk ' $2 ~ /ngeth/ {print "ngctl shutdown "$2":";}' | sh

# add already 700 vlan
cat test_creating_vlan.sh:

#!/bin/sh

# man ng_vlan

ETHER_IF=em2

ngctl -f- <<EOF
     mkpeer ${ETHER_IF}: vlan lower downstream
     name ${ETHER_IF}:lower vlan-${ETHER_IF}
     connect ${ETHER_IF}: vlan-${ETHER_IF}: upper nomatch
EOF

for i in `jot 700 100`; do
    ngctl mkpeer vlan-${ETHER_IF}: eiface vlan$i ether
    ngctl msg vlan-${ETHER_IF}: addfilter \{ vlan=$i hook=\"vlan$i\" \}
done

### Again we delete these 700 vlans
ngctl list | awk ' $2 ~ /ngeth/ {print "ngctl shutdown "$2":";}' | sh

### and
kernel panic

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


More information about the freebsd-net mailing list