From 2ae33c6c4cbba064d6d8162e4418c1a64cd8c84b Mon Sep 17 00:00:00 2001 From: Lukas Sismis Date: Tue, 4 Feb 2025 10:17:46 +0100 Subject: [PATCH] dpdk: use default iface-copy value if not specified Ticket: 7375 (cherry picked from commit 31fbfc322c32e9932288862eb607012558e36c30) --- src/runmode-dpdk.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/runmode-dpdk.c b/src/runmode-dpdk.c index e9642a9beb..edf411dc76 100644 --- a/src/runmode-dpdk.c +++ b/src/runmode-dpdk.c @@ -808,17 +808,15 @@ static int ConfigLoad(DPDKIfaceConfig *iconf, const char *iface) SCReturnInt(retval); retval = ConfGetChildValueWithDefault(if_root, if_default, dpdk_yaml.copy_mode, ©_mode_str); - if (retval != 1) - SCReturnInt(-ENOENT); - if (retval < 0) - SCReturnInt(retval); + if (retval != 1) { + copy_mode_str = DPDK_CONFIG_DEFAULT_COPY_MODE; + } retval = ConfGetChildValueWithDefault( if_root, if_default, dpdk_yaml.copy_iface, ©_iface_str); - if (retval != 1) - SCReturnInt(-ENOENT); - if (retval < 0) - SCReturnInt(retval); + if (retval != 1) { + copy_iface_str = DPDK_CONFIG_DEFAULT_COPY_INTERFACE; + } retval = ConfigSetCopyIfaceSettings(iconf, copy_iface_str, copy_mode_str); if (retval < 0) -- 2.47.2