Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
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
cpp-libs
libnice
Commits
0245565e
Commit
0245565e
authored
Jun 26, 2019
by
Stefan Becker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: ignore non-running interfaces
Check for IFF_UP and IFF_RUNNING flags on the interface.
parent
ac4149c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
agent/interfaces.c
agent/interfaces.c
+13
-0
No files found.
agent/interfaces.c
View file @
0245565e
...
...
@@ -266,6 +266,10 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
if
((
ifa
->
ifa_flags
&
IFF_UP
)
==
0
)
continue
;
/* no ip address from interface that isn't running */
if
((
ifa
->
ifa_flags
&
IFF_RUNNING
)
==
0
)
continue
;
if
(
ifa
->
ifa_addr
==
NULL
)
continue
;
...
...
@@ -360,6 +364,15 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
" Skipping..."
,
ifr
->
ifr_name
);
continue
;
/* failed to get flags, skip it */
}
/* no ip address from interface that is down */
if
((
ifr
->
ifr_flags
&
IFF_UP
)
==
0
)
continue
;
/* no ip address from interface that isn't running */
if
((
ifr
->
ifr_flags
&
IFF_RUNNING
)
==
0
)
continue
;
sa
=
(
struct
sockaddr_in
*
)
&
ifr
->
ifr_addr
;
nice_debug
(
"Interface: %s"
,
ifr
->
ifr_name
);
nice_debug
(
"IP Address: %s"
,
inet_ntoa
(
sa
->
sin_addr
));
...
...
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