Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libloc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
libloc
Commits
5a01e11e
Commit
5a01e11e
authored
Mar 07, 2022
by
Michael Tremer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bogons: Don't consider a network legitimate without a country code
Signed-off-by:
Michael Tremer
<
michael.tremer@ipfire.org
>
parent
c0b1f64f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/database.c
src/database.c
+13
-0
No files found.
src/database.c
View file @
5a01e11e
...
...
@@ -1430,6 +1430,19 @@ static int __loc_database_enumerator_next_bogon(
if
(
!
network
)
goto
FINISH
;
const
char
*
country_code
=
loc_network_get_country_code
(
network
);
/*
Skip anything that does not have a country code
Even if a network is part of the routing table, and the database provides
an ASN, this does not mean that this is a legitimate announcement.
*/
if
(
country_code
&&
!*
country_code
)
{
loc_network_unref
(
network
);
continue
;
}
// Determine the network family
int
family
=
loc_network_address_family
(
network
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment