From cdac0425a8d7a0bdade081d4a2a8f566e0030fab Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 18 Dec 2022 07:46:44 +0100 Subject: [PATCH] device: special case handling of dpdk devices --- src/util-device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util-device.c b/src/util-device.c index 5aa8451b3f..26220ecfb3 100644 --- a/src/util-device.c +++ b/src/util-device.c @@ -247,6 +247,11 @@ static int LiveSafeDeviceName(const char *devname, char *newdevname, size_t dest /* If we have to shorten the interface name */ if (devnamelen > MAX_DEVNAME) { + /* special mode for DPDK pci addresses */ + if (devnamelen >= 5 && strncmp(devname, "0000:", 5) == 0) { + strlcpy(newdevname, devname + 5, destlen); + return 0; + } /* IF the dest length is over 10 chars long it will not do any * good for the shortening. The shortening is done due to the