瀏覽代碼

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>
David S. Miller 8 年之前
父節點
當前提交
af8530cb47
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 2 0
      net/mac80211/rx.c
  2. 2 1
      net/wireless/nl80211.c

+ 2 - 0
net/mac80211/rx.c

@@ -3632,6 +3632,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
 		}
 		}
 		return true;
 		return true;
 	case NL80211_IFTYPE_MESH_POINT:
 	case NL80211_IFTYPE_MESH_POINT:
+		if (ether_addr_equal(sdata->vif.addr, hdr->addr2))
+			return false;
 		if (multicast)
 		if (multicast)
 			return true;
 			return true;
 		return ether_addr_equal(sdata->vif.addr, hdr->addr1);
 		return ether_addr_equal(sdata->vif.addr, hdr->addr1);

+ 2 - 1
net/wireless/nl80211.c

@@ -11361,7 +11361,8 @@ static int nl80211_nan_add_func(struct sk_buff *skb,
 		break;
 		break;
 	case NL80211_NAN_FUNC_FOLLOW_UP:
 	case NL80211_NAN_FUNC_FOLLOW_UP:
 		if (!tb[NL80211_NAN_FUNC_FOLLOW_UP_ID] ||
 		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;
 			err = -EINVAL;
 			goto out;
 			goto out;
 		}
 		}