From 024e37fd875c98aa5254b9bc0f17b685b42ea6fd Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Fri, 29 Apr 2022 13:50:26 -0300 Subject: [PATCH] pbrd: fix interface compare usage Don't use `strncmp` when we expect to match the whole string. Signed-off-by: Rafael Zalamena --- pbrd/pbr_map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c index 7710f3277d..5daac55deb 100644 --- a/pbrd/pbr_map.c +++ b/pbrd/pbr_map.c @@ -408,8 +408,7 @@ struct pbr_map_sequence *pbrms_lookup_unique(uint32_t unique, char *ifname, RB_FOREACH (pbrm, pbr_map_entry_head, &pbr_maps) { for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) { - if (strncmp(pmi->ifp->name, ifname, INTERFACE_NAMSIZ) - != 0) + if (strcmp(pmi->ifp->name, ifname) != 0) continue; if (ppmi)