diff options
author | David S. Miller <davem@davemloft.net> | 2020-03-26 02:58:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-26 02:58:11 +0100 |
commit | 9fb16955fb661945ddffce4504dcffbe55cd518a (patch) | |
tree | e0811476a96a9411686e24f15a48d63cc6d02e49 /drivers/net/macsec.c | |
parent | cxgb4: Add support to catch bits set in INT_CAUSE5 (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
download | linux-9fb16955fb661945ddffce4504dcffbe55cd518a.tar.xz linux-9fb16955fb661945ddffce4504dcffbe55cd518a.zip |
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; |