Re: [PATCH net v2] bridge: flush br's address entry in fdb when remove the bridge dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ding Tianhong <dingtianhong@xxxxxxxxxx>
Date: Wed, 20 Nov 2013 09:58:02 +0800

> From 241ddeaad73c7ed9e376a4b0926e79bdc3df9f58 Mon Sep 17 00:00:00 2001
> From: Ding Tianhong <dingtianhong@xxxxxxxxxx>
> Date: Sat, 7 Dec 2013 22:12:05 +0800
> Subject: [PATCH] bridge: flush br's address entry in fdb when remove the
>  bridge dev
> 
> When the following commands are executed:
> 
> brctl addbr br0
> ifconfig br0 hw ether <addr>
> rmmod bridge
> 
> The calltrace will occur:
 ...
> The reason is that when the bridge dev's address is changed, the
> br_fdb_change_mac_address() will add new address in fdb, but when
> the bridge was removed, the address entry in the fdb did not free,
> the bridge_fdb_cache still has objects when destroy the cache, Fix
> this by flushing the bridge address entry when removing the bridge.
> 
> v2: according to the Toshiaki Makita and Vlad's suggestion, I only
>     delete the vlan0 entry, it still have a leak here if the vlan id
>     is other number, so I need to call fdb_delete_by_port(br, NULL, 1)
>     to flush all entries whose dst is NULL for the bridge.
> 
> Suggested-by: Toshiaki Makita <toshiaki.makita1@xxxxxxxxx>
> Suggested-by: Vlad Yasevich <vyasevich@xxxxxxxxx>
> Signed-off-by: Ding Tianhong <dingtianhong@xxxxxxxxxx>

Applied and queued up for -stable, thanks.




[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux