summaryrefslogtreecommitdiff
path: root/pbrd
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2022-04-29 13:50:26 -0300
committerRafael Zalamena <rzalamena@opensourcerouting.org>2022-05-02 11:33:48 -0300
commit024e37fd875c98aa5254b9bc0f17b685b42ea6fd (patch)
treea2d6d6f82e90e4c88d5cfdb1f1df9908382cba1a /pbrd
parent5bcc6b469cf01b91c32255b4fd33830ca0e222aa (diff)
pbrd: fix interface compare usage
Don't use `strncmp` when we expect to match the whole string. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'pbrd')
-rw-r--r--pbrd/pbr_map.c3
1 files changed, 1 insertions, 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)