]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/bridge/br_netlink.c
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[karo-tx-linux.git] / net / bridge / br_netlink.c
index c5ce7745b230fa3e67b66ba211be00d66cdc52da..574f78824d8a2ae53751bbe1849e53502bc575be 100644 (file)
@@ -835,6 +835,13 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[])
                        return -EPROTONOSUPPORT;
                }
        }
+
+       if (data[IFLA_BR_VLAN_DEFAULT_PVID]) {
+               __u16 defpvid = nla_get_u16(data[IFLA_BR_VLAN_DEFAULT_PVID]);
+
+               if (defpvid >= VLAN_VID_MASK)
+                       return -EINVAL;
+       }
 #endif
 
        return 0;