]> Pileus Git - ~andy/linux/blobdiff - net/bridge/br_private_stp.h
bridge: range check STP parameters
[~andy/linux] / net / bridge / br_private_stp.h
index 8b650f7fbfa08823c7e75793cc0cdf23e4bd2036..642ef47a867e405d0619ccce8100bb6f3e4f9090 100644 (file)
 #define BPDU_TYPE_CONFIG 0
 #define BPDU_TYPE_TCN 0x80
 
+/* IEEE 802.1D-1998 timer values */
+#define BR_MIN_HELLO_TIME      (1*HZ)
+#define BR_MAX_HELLO_TIME      (10*HZ)
+
+#define BR_MIN_FORWARD_DELAY   (2*HZ)
+#define BR_MAX_FORWARD_DELAY   (30*HZ)
+
+#define BR_MIN_MAX_AGE         (6*HZ)
+#define BR_MAX_MAX_AGE         (40*HZ)
+
+#define BR_MIN_PATH_COST       1
+#define BR_MAX_PATH_COST       65535
+
 struct br_config_bpdu
 {
        unsigned        topology_change:1;