diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-04 18:47:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-04 18:47:34 +0300 |
commit | af8530cb4746d8e11135ae1d8d69a817feeaa91b (patch) | |
tree | 1759a69405095fee3f1ec056537fb9ab365e307a /net | |
parent | 54e98b5d663fcd8e3279c2391537b1a1f7bfe344 (diff) | |
parent | 736a80bbfda709fb3631f5f62056f250a38e5804 (diff) | |
download | linux-af8530cb4746d8e11135ae1d8d69a817feeaa91b.tar.xz |
Merge tag 'mac80211-for-davem-2018-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
Two fixes:
* drop mesh frames appearing to be from ourselves
* check another netlink attribute for existence
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 2 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 70e9d2ca8bbe..4daafb07602f 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3632,6 +3632,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) } return true; case NL80211_IFTYPE_MESH_POINT: + if (ether_addr_equal(sdata->vif.addr, hdr->addr2)) + return false; if (multicast) return true; return ether_addr_equal(sdata->vif.addr, hdr->addr1); diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 213d0c498c97..2b3dbcd40e46 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -11361,7 +11361,8 @@ static int nl80211_nan_add_func(struct sk_buff *skb, break; case NL80211_NAN_FUNC_FOLLOW_UP: if (!tb[NL80211_NAN_FUNC_FOLLOW_UP_ID] || - !tb[NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID]) { + !tb[NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID] || + !tb[NL80211_NAN_FUNC_FOLLOW_UP_DEST]) { err = -EINVAL; goto out; } |