diff options
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_netlink.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c index c29b5c838833..cdc7df4fdb8a 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
34 | #include <linux/if_arp.h> /* For ARPHRD_xxx */ | ||
34 | #include <linux/module.h> | 35 | #include <linux/module.h> |
35 | #include <net/rtnetlink.h> | 36 | #include <net/rtnetlink.h> |
36 | #include "ipoib.h" | 37 | #include "ipoib.h" |
@@ -103,7 +104,7 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev, | |||
103 | return -EINVAL; | 104 | return -EINVAL; |
104 | 105 | ||
105 | pdev = __dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK])); | 106 | pdev = __dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK])); |
106 | if (!pdev) | 107 | if (!pdev || pdev->type != ARPHRD_INFINIBAND) |
107 | return -ENODEV; | 108 | return -ENODEV; |
108 | 109 | ||
109 | ppriv = netdev_priv(pdev); | 110 | ppriv = netdev_priv(pdev); |