Fix KTLS compilation error
authorMatt Caswell <matt@openssl.org>
Fri, 19 Apr 2019 12:53:56 +0000 (13:53 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 25 Apr 2019 12:02:52 +0000 (13:02 +0100)
If the kernel headers are sufficiently recent to have KTLS transmit
support, but not recent enough to have KTLS receive support then a
compilation error would be the result.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8793)

include/internal/ktls.h

index 5495a8de5199721134fb221a48632b0c02621d45..d7bd1f3b668ee1f449c436534dbab2bc2130ea08 100644 (file)
@@ -90,6 +90,10 @@ static ossl_inline int ktls_read_record(int fd, void *data, size_t length)
 #     define TCP_ULP 31
 #    endif
 
+#    ifndef TLS_RX
+#     define TLS_RX                  2
+#    endif
+
 /*
  * When successful, this socket option doesn't change the behaviour of the
  * TCP socket, except changing the TCP setsockopt handler to enable the