netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bridge vlan malfunctions for vid greater than 63
@ 2013-08-20  8:07 Toshiaki Makita
  2013-08-20  8:10 ` [net PATCH] bridge: Use the correct bit length for bitmap functions in the VLAN code Toshiaki Makita
  0 siblings, 1 reply; 3+ messages in thread
From: Toshiaki Makita @ 2013-08-20  8:07 UTC (permalink / raw)
  To: David S. Miller, Vlad Yasevich, netdev; +Cc: Toshiaki Makita

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-21  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20  8:07 Bridge vlan malfunctions for vid greater than 63 Toshiaki Makita
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).