From ecb9d18c59f65c87430d6a7c53ee1e525d75d430 Mon Sep 17 00:00:00 2001 From: MathiasRaoul Date: Tue, 10 Dec 2019 10:56:20 +0000 Subject: quic: update quicly to v0.0.8-vpp Type: feature Signed-off-by: MathiasRaoul Change-Id: I7470d79d1e39716ff83ba2d2b320813d79e2554c --- build/external/packages/quicly.mk | 4 +- .../quicly_0.0.8-vpp/0001-cmake-install.patch | 60 ++++++++++++++++++++++ src/plugins/quic/error.c | 13 ++--- src/plugins/quic/quic.c | 1 + 4 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 build/external/patches/quicly_0.0.8-vpp/0001-cmake-install.patch diff --git a/build/external/packages/quicly.mk b/build/external/packages/quicly.mk index 1b57c84b04e..963f815fc02 100644 --- a/build/external/packages/quicly.mk +++ b/build/external/packages/quicly.mk @@ -11,9 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -quicly_version := 0.0.7-vpp +quicly_version := 0.0.8-vpp quicly_tarball := quicly_$(quicly_version).tar.gz -quicly_tarball_md5sum := 2608aef70e3dc89406d3d20b71d02a4c +quicly_tarball_md5sum := 31053a9a1a015903bd1b7beb62a376c1 quicly_tarball_strip_dirs := 1 quicly_url := https://github.com/vpp-quic/quicly/releases/download/v$(quicly_version)/quicly_$(quicly_version).tar.gz diff --git a/build/external/patches/quicly_0.0.8-vpp/0001-cmake-install.patch b/build/external/patches/quicly_0.0.8-vpp/0001-cmake-install.patch new file mode 100644 index 00000000000..0ca7d2986d4 --- /dev/null +++ b/build/external/patches/quicly_0.0.8-vpp/0001-cmake-install.patch @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f5478d3..156df4c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,6 +65,8 @@ IF (WITH_DTRACE) + ENDIF () + ENDIF () + ++SET(CMAKE_POSITION_INDEPENDENT_CODE ON) ++ + ADD_LIBRARY(quicly ${QUICLY_LIBRARY_FILES}) + + ADD_CUSTOM_COMMAND( +@@ -84,6 +86,16 @@ TARGET_LINK_LIBRARIES(examples-echo quicly ${OPENSSL_LIBRARIES} ${CMAKE_DL_LIBS} + + ADD_EXECUTABLE(udpfw t/udpfw.c) + ++INSTALL ( ++ DIRECTORY ${CMAKE_SOURCE_DIR}/include/ ++ DESTINATION include ++ FILES_MATCHING PATTERN "*.h") ++ ++INSTALL(TARGETS quicly ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ + ADD_CUSTOM_TARGET(check env BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} WITH_DTRACE=${WITH_DTRACE} prove --exec "sh -c" -v ${CMAKE_CURRENT_BINARY_DIR}/*.t t/*.t + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS cli test.t) +Submodule deps/picotls contains untracked content +Submodule deps/picotls contains modified content +diff --git a/deps/picotls/CMakeLists.txt b/deps/picotls/CMakeLists.txt +index 874b9be..14411e2 100644 +--- a/deps/picotls/CMakeLists.txt ++++ b/deps/picotls/CMakeLists.txt +@@ -12,6 +12,7 @@ IF (WITH_DTRACE) + MESSAGE(STATUS "Enabling USDT support") + ENDIF () + ++SET(CMAKE_POSITION_INDEPENDENT_CODE ON) + SET(CMAKE_C_FLAGS "-std=c99 -Wall -O2 -g ${CC_WARNING_FLAGS} ${CMAKE_C_FLAGS}") + INCLUDE_DIRECTORIES( + deps/cifra/src/ext +@@ -131,6 +132,15 @@ ELSE () + MESSAGE(WARNING "Disabling OpenSSL support (requires 1.0.1 or newer)") + ENDIF () + ++INSTALL (DIRECTORY ${CMAKE_SOURCE_DIR}/include/ ++ DESTINATION include ++ FILES_MATCHING PATTERN "*.h") ++ ++INSTALL(TARGETS picotls-core picotls-openssl ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ + ADD_CUSTOM_TARGET(check env BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} prove --exec '' -v ${CMAKE_CURRENT_BINARY_DIR}/*.t t/*.t WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${TEST_EXES} cli) + + IF (CMAKE_SYSTEM_NAME STREQUAL "Linux") diff --git a/src/plugins/quic/error.c b/src/plugins/quic/error.c index 72aa99909f6..ed2ca111e83 100644 --- a/src/plugins/quic/error.c +++ b/src/plugins/quic/error.c @@ -16,6 +16,7 @@ #include #include +#include u8 * quic_format_err (u8 * s, va_list * args) @@ -73,8 +74,8 @@ quic_format_err (u8 * s, va_list * args) case QUICLY_TRANSPORT_ERROR_STREAM_STATE: s = format (s, "QUICLY_TRANSPORT_ERROR_STREAM_STATE"); break; - case QUICLY_TRANSPORT_ERROR_FINAL_OFFSET: - s = format (s, "QUICLY_TRANSPORT_ERROR_FINAL_OFFSET"); + case QUICLY_TRANSPORT_ERROR_FINAL_SIZE: + s = format (s, "QUICLY_TRANSPORT_ERROR_FINAL_SIZE"); break; case QUICLY_TRANSPORT_ERROR_FRAME_ENCODING: s = format (s, "QUICLY_TRANSPORT_ERROR_FRAME_ENCODING"); @@ -82,14 +83,14 @@ quic_format_err (u8 * s, va_list * args) case QUICLY_TRANSPORT_ERROR_TRANSPORT_PARAMETER: s = format (s, "QUICLY_TRANSPORT_ERROR_TRANSPORT_PARAMETER"); break; - case QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION: - s = format (s, "QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION"); + case QUICLY_ERROR_NO_COMPATIBLE_VERSION: + s = format (s, "QUICLY_ERROR_NO_COMPATIBLE_VERSION"); break; case QUICLY_TRANSPORT_ERROR_PROTOCOL_VIOLATION: s = format (s, "QUICLY_TRANSPORT_ERROR_PROTOCOL_VIOLATION"); break; - case QUICLY_TRANSPORT_ERROR_INVALID_MIGRATION: - s = format (s, "QUICLY_TRANSPORT_ERROR_INVALID_MIGRATION"); + case QUICLY_TRANSPORT_ERROR_CRYPTO_BUFFER_EXCEEDED: + s = format (s, "QUICLY_TRANSPORT_ERROR_CRYPTO_BUFFER_EXCEEDED"); break; /* picotls errors */ case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CLOSE_NOTIFY): diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c index 04e969dfffe..f4e0aabdba2 100644 --- a/src/plugins/quic/quic.c +++ b/src/plugins/quic/quic.c @@ -28,6 +28,7 @@ #include #include +#include #include static char *quic_error_strings[] = { -- cgit 1.2.3-korg