Skip to content

Commit

Permalink
Exclude both real and also mock hardware addresses
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Oct 26, 2024
1 parent ff0ffff commit cd5c2f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ int api_client_suggestions(struct ftl_conn *api)
"FROM network_addresses na "
"WHERE na.network_id = n.id) "
"FROM network n "
"WHERE n.hwaddr NOT IN (SELECT CONCAT('ip-',lower(ip)) FROM g.client)"
"WHERE n.hwaddr NOT IN (SELECT lower(ip) FROM g.client)" // real hardware addresses
"AND n.hwaddr NOT IN (SELECT CONCAT('ip-',lower(ip)) FROM g.client)" // mock hardware addresses built from IP addresses
"ORDER BY lastQuery DESC LIMIT ?";

if(sqlite3_prepare_v2(db, sql, -1, &stmt, NULL) != SQLITE_OK)
Expand Down

0 comments on commit cd5c2f8

Please sign in to comment.