diff options
author | David S. Miller <davem@davemloft.net> | 2020-03-25 18:58:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-25 18:58:11 -0700 |
commit | 9fb16955fb661945ddffce4504dcffbe55cd518a (patch) | |
tree | e0811476a96a9411686e24f15a48d63cc6d02e49 /drivers/net/macsec.c | |
parent | 1f074e677a343afcd852af5ee725bacc937fa6bd (diff) | |
parent | 1b649e0bcae71c118c1333e02249a7510ba7f70a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Overlapping header include additions in macsec.c
A bug fix in 'net' overlapping with the removal of 'version'
string in ena_netdev.c
Overlapping test additions in selftests Makefile
Overlapping PCI ID table adjustments in iwlwifi driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macsec.c')
-rw-r--r-- | drivers/net/macsec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 49b138e7aeac..35abebe95b79 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -20,6 +20,7 @@ #include <net/macsec.h> #include <linux/phy.h> #include <linux/byteorder/generic.h> +#include <linux/if_arp.h> #include <uapi/linux/if_macsec.h> @@ -3856,6 +3857,8 @@ static int macsec_newlink(struct net *net, struct net_device *dev, real_dev = __dev_get_by_index(net, nla_get_u32(tb[IFLA_LINK])); if (!real_dev) return -ENODEV; + if (real_dev->type != ARPHRD_ETHER) + return -EINVAL; dev->priv_flags |= IFF_MACSEC; |