Skip to content

Commit

Permalink
Ticket #10955: Fix "default" case
Browse files Browse the repository at this point in the history
Make a string check to cover "default" gateway
  • Loading branch information
rbgarga committed Nov 2, 2020
1 parent acb79de commit b155857
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/etc/inc/util.inc
Expand Up @@ -2645,7 +2645,8 @@ function route_get($target, $ipprotocol = '') {

$result = array();
foreach ($rtable[$family] as $item) {
if (ip_in_subnet($target, $item['destination'])) {
if ($item['destination'] == $target ||
ip_in_subnet($target, $item['destination'])) {
$result[] = $item;
}
}
Expand Down

0 comments on commit b155857

Please sign in to comment.