Filter: Fix comparison of BGP path mask
Add a missing return statement. Path masks with the same length were all considered the same. Comparing two with different length would cause out-of-bounds memory access.
This commit is contained in:
parent
82937b465b
commit
4ef0a96639
1 changed files with 1 additions and 0 deletions
|
@ -230,6 +230,7 @@ static int
|
|||
pm_same(const struct f_path_mask *m1, const struct f_path_mask *m2)
|
||||
{
|
||||
if (m1->len != m2->len)
|
||||
return 0;
|
||||
|
||||
for (uint i=0; i<m1->len; i++)
|
||||
if (!pmi_same(&(m1->item[i]), &(m2->item[i])))
|
||||
|
|
Loading…
Reference in a new issue