]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix logic bug in table_sorted_value_by_longest_prefix which sent the search in the...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 19 Oct 2019 16:51:49 +0000 (12:51 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 19 Oct 2019 16:51:49 +0000 (12:51 -0400)
src/lib/util/table.c

index be34732e520822d52962959556643d8a6a549f3d..56d3c734872da662062ac1049ddde403f9e5ce11 100644 (file)
@@ -340,6 +340,8 @@ static void const *table_sorted_value_by_longest_prefix(size_t *match_len,
                                found = offset;
                                if (match_len) *match_len = tlen;
                                ret = 1;
+                       } else {
+                               ret = -1;
                        }
                }