mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support start SRS when wireshark capturing
This commit is contained in:
parent
15384e61e2
commit
f853c7a1e0
1 changed files with 2 additions and 1 deletions
|
@ -205,7 +205,8 @@ void retrieve_local_ips()
|
|||
// @see: https://github.com/ossrs/srs/issues/141
|
||||
bool ipv4 = (cur->ifa_addr->sa_family == AF_INET);
|
||||
bool ready = (cur->ifa_flags & IFF_UP) && (cur->ifa_flags & IFF_RUNNING);
|
||||
bool ignored = (!cur->ifa_addr) || (cur->ifa_flags & IFF_POINTOPOINT) || (cur->ifa_flags & IFF_PROMISC) || (cur->ifa_flags & IFF_LOOPBACK);
|
||||
// Ignore IFF_PROMISC(Interface is in promiscuous mode), which may be set by Wireshark.
|
||||
bool ignored = (!cur->ifa_addr) || (cur->ifa_flags & IFF_LOOPBACK) || (cur->ifa_flags & IFF_POINTOPOINT);
|
||||
if (ipv4 && ready && !ignored) {
|
||||
discover_network_iface(cur, ips, ss0, ss1, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue