Ensure that ending ports are checked when starting ports are equal
This commit is contained in:
parent
7a87f6fe34
commit
496e08f9d9
1 changed files with 6 additions and 0 deletions
|
@ -44,6 +44,12 @@ int compare_rule(struct Rule *a, struct Rule *b) {
|
||||||
result = akpa_numcmp(a->port.start, b->port.start);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue