diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2015-05-28 15:38:43 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-05-31 13:40:53 +0200 |
commit | daf4e2c89254ed6eb8cf7ef60f614edebfdb9f3a (patch) | |
tree | fd72d07f8db81663f8b0197bff3e5fde351f3988 /net/mac802154 | |
parent | 3b369bd212d5cabb46cff0e863298971b382bbd6 (diff) | |
download | linux-daf4e2c89254ed6eb8cf7ef60f614edebfdb9f3a.tar.gz linux-daf4e2c89254ed6eb8cf7ef60f614edebfdb9f3a.tar.bz2 linux-daf4e2c89254ed6eb8cf7ef60f614edebfdb9f3a.zip |
ieee802154: Fix EUI-64 station address validation.
Refuse to allow setting an EUI-64 group address as an interface
address, as those are not valid station addresses.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/iface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c index b544b5dc4bfb..6ac023932ce0 100644 --- a/net/mac802154/iface.c +++ b/net/mac802154/iface.c @@ -126,7 +126,7 @@ static int mac802154_wpan_mac_addr(struct net_device *dev, void *p) return -EBUSY; ieee802154_be64_to_le64(&extended_addr, addr->sa_data); - if (!ieee802154_is_valid_extended_addr(extended_addr)) + if (!ieee802154_is_valid_extended_unicast_addr(extended_addr)) return -EINVAL; memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); @@ -539,7 +539,7 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name, switch (type) { case NL802154_IFTYPE_NODE: ndev->type = ARPHRD_IEEE802154; - if (ieee802154_is_valid_extended_addr(extended_addr)) + if (ieee802154_is_valid_extended_unicast_addr(extended_addr)) ieee802154_le64_to_be64(ndev->dev_addr, &extended_addr); else memcpy(ndev->dev_addr, ndev->perm_addr, |