Skip to content
Snippets Groups Projects
Commit f60abe38 authored by Rahul Thakur's avatar Rahul Thakur
Browse files

iopsys-brcm63xx-arm: fix untagged bridge behaviour

I am satisfied now that the regression test failure is not software
issues, scripts need to be looked at in isolation
parent 80c16a60
No related branches found
No related tags found
No related merge requests found
...@@ -167,6 +167,13 @@ vlanCtl_cmdConfigDscp2PbitMap() ...@@ -167,6 +167,13 @@ vlanCtl_cmdConfigDscp2PbitMap()
vlanctl --if $1 --cfg-dscp2pbits $2 $3 vlanctl --if $1 --cfg-dscp2pbits $2 $3
} }
vlanCtl_filterOnEtherType()
{
# _v "vlanctl --filter-ethertype $ETHERTYPE"
# vlanctl --filter-ethertype $ETHERTYPE"
TAGRULE="$TAGRULE --filter-ethertype $1"
}
vlanCtl_filterOnPbit() vlanCtl_filterOnPbit()
{ {
# _v "vlanctl --filter-pbits $PRIORITY $TAGINDEX" # _v "vlanctl --filter-pbits $PRIORITY $TAGINDEX"
...@@ -504,6 +511,32 @@ create_vlan() { ...@@ -504,6 +511,32 @@ create_vlan() {
vlanCtl_setReceiveVlanDevice $NAME vlanCtl_setReceiveVlanDevice $NAME
if [ $BRIDGED -eq 1 ]; then if [ $BRIDGED -eq 1 ]; then
# filter tagged and double tagged packets on untagged interface,
# else the bridge is as good as transparent
vlanCtl_filterOnEtherType "0x8100"
vlanCtl_cmdDropFrame
# Set rule to the top of rx tag rule table-1 to drop tagged packets
DIRECTION="rx"
TAGS=1
POSITION="rule-insert-before"
TAGRULEID="-1"
vlanCtl_insertTagRule $IFNAME $DIRECTION $TAGS $POSITION $TAGRULEID
vlanCtl_initTagRule
vlanCtl_setReceiveVlanDevice $NAME
vlanCtl_filterOnEtherType "0x88A8"
vlanCtl_cmdDropFrame
# Set rule to the top of rx tag rule table-2 to drop double tagged packets
DIRECTION="rx"
TAGS=2
POSITION="rule-insert-before"
TAGRULEID="-1"
vlanCtl_insertTagRule $IFNAME $DIRECTION $TAGS $POSITION $TAGRULEID
vlanCtl_initTagRule
vlanCtl_setReceiveVlanDevice $NAME
# Insert the vlan header into the frame and forward if its # Insert the vlan header into the frame and forward if its
# a L2 bridge else, unconditionally forward to the rx vlan # a L2 bridge else, unconditionally forward to the rx vlan
# interface # interface
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment