Re: [PATCH] wpa_supplicant: multi_ap: only enable 4addr mode if not already enabled

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

 



On Wed, 2021-02-10 at 12:37 +0100, Janusz Dziedzic wrote:

> > > Did fast patch (didn't check code deeply yet - just check set 4addr
> > > when busy issuey, seems works correctly):
> > > diff --git a/net/wireless/util.c b/net/wireless/util.c
> > > @@ -1027,6 +1027,7 @@ int cfg80211_change_iface(struct
> > > cfg80211_registered_device *rdev,
> > > 
> > >         /* if it's part of a bridge, reject changing type to station/ibss */
> > >         if (netif_is_bridge_port(dev) &&
> > > +           (ntype != otype) &&
> > >             (ntype == NL80211_IFTYPE_ADHOC ||
> > >              ntype == NL80211_IFTYPE_STATION ||
> > >              ntype == NL80211_IFTYPE_P2P_CLIENT))
> > 
> > How would that prevent disabling of 4addr mode when the netdev is in a
> > bridge?
> > 
> This what I have with cfg80211 patch included:
> root@t2:~# brctl addif br0 wlp1s0
> root@t2:~# iw wlp1s0 set 4addr on
> root@t2:~# brctl show
> bridge name bridge id STP enabled interfaces
> br0 8000.68942328a725 no wlp1s0
> 
> root@t2:~# iw wlp1s0 set 4addr off
> command failed: Device or resource busy (-16)
> root@t2:~# iw wlp1s0 set 4addr on
> root@t2:~# iw wlp1s0 set 4addr on
> 
> Seems there is another check in cfg80211 that already handle this.

It's a different code path to set 4addr on/off in this function, so this
is not really a surprise?

Anyway, from a code POV this seems OK, though I'd prefer moving the
bridge port check into the existing "ntype != otype" if there.

johannes


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux