Forbid sequence number wrapping
diff --git a/include/polarssl/error.h b/include/polarssl/error.h
index 33a2c88..ae46014 100644
--- a/include/polarssl/error.h
+++ b/include/polarssl/error.h
@@ -89,7 +89,7 @@
  * ECP       4   7 (Started from top)
  * MD        5   4
  * CIPHER    6   6
- * SSL       6   8 (Started from top)
+ * SSL       6   9 (Started from top)
  * SSL       7   31
  *
  * Module dependent error code (5 bits 0x.00.-0x.F8.)
diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h
index d610052..1904ac9 100644
--- a/include/polarssl/ssl.h
+++ b/include/polarssl/ssl.h
@@ -139,6 +139,7 @@
 #define POLARSSL_ERR_SSL_PK_TYPE_MISMATCH                  -0x6D00  /**< Public key type mismatch (eg, asked for RSA key exchange and presented EC key) */
 #define POLARSSL_ERR_SSL_UNKNOWN_IDENTITY                  -0x6C80  /**< Unkown identity received (eg, PSK identity) */
 #define POLARSSL_ERR_SSL_INTERNAL_ERROR                    -0x6C00  /**< Internal error (eg, unexpected failure in lower-level module) */
+#define POLARSSL_ERR_SSL_COUNTER_WRAPPING                  -0x6B80  /**< A counter would wrap (eg, too many messages exchanged). */
 
 /*
  * Various constants