Search Linux Wireless

Re: [RFC 06/12] mac80211: notify bridge when leaving mesh

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

 



Hey, Sorry for the late response.

On Tue, May 7, 2013 at 6:42 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> On Thu, 2013-05-02 at 19:33 -0700, Thomas Pedersen wrote:
>> After turning carrier off, any parent bridge interface
>> needs to be notified. Otherwise we would see a panic when
>> attempting to transmit frames on a mesh interface which
>> hadn't yet been put down.
>>
>> Signed-off-by: Thomas Pedersen <thomas@xxxxxxxxxxx>
>> ---
>>  net/mac80211/mesh.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
>> index eac9988..271ddc9 100644
>> --- a/net/mac80211/mesh.c
>> +++ b/net/mac80211/mesh.c
>> @@ -993,6 +993,9 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
>>       struct beacon_data *bcn;
>>
>>       netif_carrier_off(sdata->dev);
>> +     if (sdata->dev->priv_flags & IFF_BRIDGE_PORT)
>> +             /* stop bridge transmissions */
>> +             call_netdevice_notifiers(NETDEV_CHANGE, sdata->dev);
>
> Err, this seems like a really bad hack? I don't really think drivers
> should call that?

Why not? We're just notifying the bridge interface that this port has
gone down, to avoid dereferencing a null pointer (on bridge flood
traffic) after the mesh_bss has been removed.

Is cfg80211_leave_mesh() an acceptable location for this fix?

--
Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux