From: Anatoly Burakov Date: Fri, 2 Mar 2018 08:41:34 +0000 (+0000) Subject: eal: fix IPC socket path X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bed4c1dfa9b5f29debfbd5fbc13a797bbed83a34;p=dpdk.git eal: fix IPC socket path Fixes: bacaa2754017 ("eal: add channel for multi-process communication") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Acked-by: Jianfeng Tan --- diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index e4d81044fc..ec60d16436 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -489,10 +489,14 @@ mp_send(struct rte_mp_msg *msg, const char *peer, int type) return -1; } while ((ent = readdir(mp_dir))) { + char path[PATH_MAX]; + if (fnmatch(mp_filter, ent->d_name, 0) != 0) continue; - if (send_msg(ent->d_name, msg, type) < 0) + snprintf(path, sizeof(path), "%s/%s", mp_dir_path, + ent->d_name); + if (send_msg(path, msg, type) < 0) ret = -1; }