From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
To: "David S. Miller" <davem@davemloft.net>,
Vlad Yasevich <vyasevic@redhat.com>,
netdev@vger.kernel.org
Cc: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Subject: Bridge vlan malfunctions for vid greater than 63
Date: Tue, 20 Aug 2013 17:07:40 +0900 [thread overview]
Message-ID: <1376986060.5740.7.camel@ubuntu-vm-makita> (raw)
Hello.
Bridge vlan behaves unexpectedly for certain vids.
These are examples on Fedora 19 x86_64:
- "bridge vlan show" command cannot retrieve vids greater than 63,
even if patch 3e805ad (using ifinfomsg instead of rtgenmsg) is
applied.
- When we delete a vid, if no configured vid less than 64 remains,
vlan_info will be freed prematurely, which could delete other
configured vids.
- Parmanent fdb entries could not be deleted even if corresponding vid
is deleted.
I'm afraid that some bitmap functions are given the number of elements
in a bitmap array (BR_VLAN_BITMAP_LEN), which is less than the bit
length.
Example:
static int br_fill_ifinfo(struct sk_buff *skb,
...
if (!pv || bitmap_empty(pv->vlan_bitmap, BR_VLAN_BITMAP_LEN))
As BR_VLAN_BITMAP_LEN is "BITS_TO_LONGS(VLAN_N_VID)", I tested after
changing BR_VLAN_BITMAP_LEN to VLAN_N_VID, and confirmed that this
resolves that malfunctions.
The following mail contains the patch described above.
Please comment if I misunderstood something.
Thanks,
Toshiaki Makita
next reply other threads:[~2013-08-20 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 8:07 Toshiaki Makita [this message]
2013-08-20 8:10 ` [net PATCH] bridge: Use the correct bit length for bitmap functions in the VLAN code Toshiaki Makita
2013-08-21 6:36 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376986060.5740.7.camel@ubuntu-vm-makita \
--to=makita.toshiaki@lab.ntt.co.jp \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vyasevic@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox