From a1ac96f497719b897793ac14b287cb8d840651c1 Mon Sep 17 00:00:00 2001 From: Luca Muscariello Date: Fri, 22 Apr 2022 17:55:01 +0200 Subject: HICN-722: Updates on transport, RTC, manifest usage for RTC, infra. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mauro Sardara Co-authored-by: Jordan Augé Co-authored-by: Michele Papalini Co-authored-by: Angelo Mantellini Co-authored-by: Jacques Samain Co-authored-by: Olivier Roques Co-authored-by: Enrico Loparco Co-authored-by: Giulio Grassi manifest: optimize manifest processing manifest: add FEC parameters to manifests manifest: refactor verification process manifest: report auth alerts in hiperf instead of aborting manifest: remove FEC buffer callback in consumer manifest: refactor and enable manifests by default manifest: update manifest header with transport parameters manifest: batch interests for first manifest from RTC producer manifest: refactor processing of RTC manifests manifest: update manifest-related socket options of consumers manifest: update unit tests for manifests manifest: pack manifest headers manifest: verify FEC packets auth: add consumer socket option to set max unverified delay manifest: process manifests after full FEC decoding manifest: manage forward jumps in RTC verifier fec: remove useless fec codes rs: add new code rate rs: add new code rate rs: add new code rate rs: add new code rate libtransport: increase internal packet cache size remove internal cisco info in cmake manifest: add option to set manifest capacity data_input_node.c: add information about adj_index[VLIB_RX] on received data packetsi sysrepo plugin: update build Change-Id: I0cf64d91bd0a1b7cad4eeaa9871f58f5f10434af Signed-off-by: Mauro Sardara Signed-off-by: Luca Muscariello --- ctrl/libhicnctrl/src/api.c | 7 ++++++- ctrl/libhicnctrl/src/api_private.h | 1 + ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake | 9 ++------- ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'ctrl') diff --git a/ctrl/libhicnctrl/src/api.c b/ctrl/libhicnctrl/src/api.c index 4156ceff9..472e07bc4 100644 --- a/ctrl/libhicnctrl/src/api.c +++ b/ctrl/libhicnctrl/src/api.c @@ -689,7 +689,12 @@ int hc_route_validate(const hc_route_t *route) { ERROR("[hc_route_validate] Invalid connection id"); return -1; } - if (!IS_VALID_NAME(route->name) && !IS_VALID_STR_ID(route->name)) { + if (route->name[0] == '\0') { + if (!IS_VALID_FACE_ID(route->face_id)) { + ERROR("[hc_route_validate] Invalid face_id"); + return -1; + } + } else if (!IS_VALID_NAME(route->name) && !IS_VALID_STR_ID(route->name)) { ERROR("[hc_route_validate] Invalid name specified"); return -1; } diff --git a/ctrl/libhicnctrl/src/api_private.h b/ctrl/libhicnctrl/src/api_private.h index 11cb2e00e..65b175810 100644 --- a/ctrl/libhicnctrl/src/api_private.h +++ b/ctrl/libhicnctrl/src/api_private.h @@ -73,6 +73,7 @@ static inline bool IS_VALID_STR_ID(const char *name) { #define IS_VALID_TYPE(x) IS_VALID_ENUM_TYPE(FACE_TYPE, x) #define IS_VALID_ADDR_TYPE(x) ((x >= ADDR_INET) && (x <= ADDR_UNIX)) +#define IS_VALID_FACE_ID(x) ((x) != INVALID_FACE_ID) #define IS_VALID_ID(x) (1) #define IS_VALID_POLICY(x) (1) diff --git a/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake b/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake index cba9adf1f..19be58beb 100644 --- a/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake +++ b/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake @@ -15,22 +15,17 @@ # Packages section ###################### -############################################################## -# Get VPP version -############################################################## -list(GET VPP_DEFAULT_VERSION 0 VPP_VERSION) - set(hicn-sysrepo-plugin_DESCRIPTION "A Plugin to enable hICN VPP in sysrepo." CACHE STRING "Description for deb/rpm package." ) set(hicn-sysrepo-plugin_DEB_DEPENDENCIES - "hicn-plugin (= ${VPP_VERSION}-release), sysrepo (>= 1.0)" + "hicn-plugin (= ${PREFIX_VERSION}-release), sysrepo (>= 1.0)" CACHE STRING "Dependencies for deb/rpm package." ) set(hicn-sysrepo-plugin_RPM_DEPENDENCIES - "hicn-plugin = ${VPP_VERSION}-release, sysrepo >= 1.0" + "hicn-plugin = ${PREFIX_VERSION}-release, sysrepo >= 1.0" CACHE STRING "Dependencies for deb/rpm package." ) diff --git a/ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt b/ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt index 9204e2766..3638f5456 100644 --- a/ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt +++ b/ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt @@ -26,7 +26,7 @@ set(SOURCE_FILES plugin/hicn_plugin.c ) -list(APPEND SYSREPO_PLUGIN_INCLUDE_DIRS +list(APPEND SYSREPO_PLUGIN_INCLUDE_DIRS PRIVATE ${VPP_INCLUDE_DIRS} ${HICNPLUGIN_INCLUDE_DIRS} ${SYSREPO_INCLUDE_DIRS} -- cgit 1.2.3-korg