Ensure that ending ports are checked when starting ports are equal

This commit is contained in:
akp 2023-11-11 18:19:22 +00:00
parent 7a87f6fe34
commit 496e08f9d9
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

View file

@ -44,6 +44,12 @@ int compare_rule(struct Rule *a, struct Rule *b) {
result = akpa_numcmp(a->port.start, b->port.start);
}
if (result == 0) {
if ((a->port.end != NULL) || (b->port.end != NULL)) {
result = akpa_numcmp(*a->port.end, *b->port.end);
}
}
return result;
}