Fix DTLS_VERSION_xx() comparison macros for DTLS1_BAD_VER
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 8 Jul 2016 19:56:38 +0000 (20:56 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 4 Aug 2016 19:56:23 +0000 (20:56 +0100)
commitff4952896ec4383a107bbe94001ca0a64ff47433
tree5fb88acc3651e2f03732f1e266b61832846050b7
parente6027420b7124d6196ccff391063a6626b1fab62
Fix DTLS_VERSION_xx() comparison macros for DTLS1_BAD_VER

DTLS version numbers are strange and backwards, except DTLS1_BAD_VER so
we have to make a special case for it.

This does leave us with a set of macros which will evaluate their arguments
more than once, but it's not a public-facing API and it's not like this is
the kind of thing where people will be using DTLS_VERSION_LE(x++, y) anyway.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/ssl_locl.h