aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_netlink.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_netlink.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
index 74685936c948..f81abe16cf09 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
@@ -119,6 +119,15 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev,
119 } else 119 } else
120 child_pkey = nla_get_u16(data[IFLA_IPOIB_PKEY]); 120 child_pkey = nla_get_u16(data[IFLA_IPOIB_PKEY]);
121 121
122 if (child_pkey == 0 || child_pkey == 0x8000)
123 return -EINVAL;
124
125 /*
126 * Set the full membership bit, so that we join the right
127 * broadcast group, etc.
128 */
129 child_pkey |= 0x8000;
130
122 err = __ipoib_vlan_add(ppriv, netdev_priv(dev), child_pkey, IPOIB_RTNL_CHILD); 131 err = __ipoib_vlan_add(ppriv, netdev_priv(dev), child_pkey, IPOIB_RTNL_CHILD);
123 132
124 if (!err && data) 133 if (!err && data)