Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2020 16:30:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 187835] ngctl(8) strange behavior when adding more than 530 vlan through netgraph
Message-ID:  <bug-187835-7501-XusAKf7USV@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-187835-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-187835-7501@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=3D187835

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

Yes, thank you.

On FreeBsd 12.1, with kern.ipc.maxsockbuf =3D 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=3Dem2

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=3D$i hook=3D\"vlan$i\" \}
done

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

### and
kernel panic

--=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-187835-7501-XusAKf7USV>