|
@@ -119,6 +119,15 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev,
|
|
|
} else
|
|
|
child_pkey = nla_get_u16(data[IFLA_IPOIB_PKEY]);
|
|
|
|
|
|
+ if (child_pkey == 0 || child_pkey == 0x8000)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Set the full membership bit, so that we join the right
|
|
|
+ * broadcast group, etc.
|
|
|
+ */
|
|
|
+ child_pkey |= 0x8000;
|
|
|
+
|
|
|
err = __ipoib_vlan_add(ppriv, netdev_priv(dev), child_pkey, IPOIB_RTNL_CHILD);
|
|
|
|
|
|
if (!err && data)
|