]> asedeno.scripts.mit.edu Git - linux.git/commit
mac80211_hwsim: calculate if_combination.max_interfaces
authorJohannes Berg <johannes.berg@intel.com>
Fri, 29 Mar 2019 07:56:22 +0000 (08:56 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2019 11:31:24 +0000 (13:31 +0200)
commit45fcef8b727b6f171bc5443e8153181a367d7a15
treed40f93ed046c8974e4d2b2c0962e3ec6934ceb29
parenta58d7525b8014115d57fd30186a84f6d30783f2c
mac80211_hwsim: calculate if_combination.max_interfaces

If we just set this to 2048, and have multiple limits you
can select from, the total number might run over and cause
a warning in cfg80211. This doesn't make sense, so we just
calculate the total max_interfaces now.

Reported-by: syzbot+8f91bd563bbff230d0ee@syzkaller.appspotmail.com
Fixes: 99e3a44bac37 ("mac80211_hwsim: allow setting iftype support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c