mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #1087, Ignore iface without address. 3.0.37
This commit is contained in:
parent
82699ff616
commit
ae99131512
3 changed files with 21 additions and 1 deletions
|
@ -184,6 +184,7 @@ Please select according to languages:
|
||||||
|
|
||||||
### V3 changes
|
### V3 changes
|
||||||
|
|
||||||
|
* v3.0, 2018-08-05, Fix [#1087][bug #1087], Ignore iface without address. 3.0.37
|
||||||
* v3.0, 2018-08-04, For [#1110][bug #1110], Support params in http callback. 3.0.36
|
* v3.0, 2018-08-04, For [#1110][bug #1110], Support params in http callback. 3.0.36
|
||||||
* v3.0, 2018-08-02, Always use vhost in stream query, the unify uri. 3.0.35
|
* v3.0, 2018-08-02, Always use vhost in stream query, the unify uri. 3.0.35
|
||||||
* v3.0, 2018-08-02, For [#1031][bug #1031], SRS edge support douyu.com. 3.0.34
|
* v3.0, 2018-08-02, For [#1031][bug #1031], SRS edge support douyu.com. 3.0.34
|
||||||
|
@ -1452,6 +1453,7 @@ Winlin
|
||||||
[bug #1057]: https://github.com/ossrs/srs/issues/1057
|
[bug #1057]: https://github.com/ossrs/srs/issues/1057
|
||||||
[bug #105]: https://github.com/ossrs/srs/issues/105
|
[bug #105]: https://github.com/ossrs/srs/issues/105
|
||||||
[bug #727]: https://github.com/ossrs/srs/issues/727
|
[bug #727]: https://github.com/ossrs/srs/issues/727
|
||||||
|
[bug #1087]: https://github.com/ossrs/srs/issues/1087
|
||||||
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
|
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
|
||||||
|
|
||||||
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 3
|
#define VERSION_MAJOR 3
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 36
|
#define VERSION_REVISION 37
|
||||||
|
|
||||||
// generated by configure, only macros.
|
// generated by configure, only macros.
|
||||||
#include <srs_auto_headers.hpp>
|
#include <srs_auto_headers.hpp>
|
||||||
|
|
|
@ -150,6 +150,12 @@ void retrieve_local_ips()
|
||||||
for (ifaddrs* p = ifap; p ; p = p->ifa_next) {
|
for (ifaddrs* p = ifap; p ; p = p->ifa_next) {
|
||||||
ifaddrs* cur = p;
|
ifaddrs* cur = p;
|
||||||
|
|
||||||
|
// Ignore if no address for this interface.
|
||||||
|
// @see https://github.com/ossrs/srs/issues/1087#issuecomment-408847115
|
||||||
|
if (!cur->ifa_addr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve IP address, ignore the tun0 network device, whose addr is NULL.
|
// retrieve IP address, ignore the tun0 network device, whose addr is NULL.
|
||||||
// @see: https://github.com/ossrs/srs/issues/141
|
// @see: https://github.com/ossrs/srs/issues/141
|
||||||
bool ipv4 = (cur->ifa_addr->sa_family == AF_INET);
|
bool ipv4 = (cur->ifa_addr->sa_family == AF_INET);
|
||||||
|
@ -164,6 +170,12 @@ void retrieve_local_ips()
|
||||||
for (ifaddrs* p = ifap; p ; p = p->ifa_next) {
|
for (ifaddrs* p = ifap; p ; p = p->ifa_next) {
|
||||||
ifaddrs* cur = p;
|
ifaddrs* cur = p;
|
||||||
|
|
||||||
|
// Ignore if no address for this interface.
|
||||||
|
// @see https://github.com/ossrs/srs/issues/1087#issuecomment-408847115
|
||||||
|
if (!cur->ifa_addr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve IP address, ignore the tun0 network device, whose addr is NULL.
|
// retrieve IP address, ignore the tun0 network device, whose addr is NULL.
|
||||||
// @see: https://github.com/ossrs/srs/issues/141
|
// @see: https://github.com/ossrs/srs/issues/141
|
||||||
bool ipv6 = (cur->ifa_addr->sa_family == AF_INET6);
|
bool ipv6 = (cur->ifa_addr->sa_family == AF_INET6);
|
||||||
|
@ -179,6 +191,12 @@ void retrieve_local_ips()
|
||||||
for (ifaddrs* p = ifap; p ; p = p->ifa_next) {
|
for (ifaddrs* p = ifap; p ; p = p->ifa_next) {
|
||||||
ifaddrs* cur = p;
|
ifaddrs* cur = p;
|
||||||
|
|
||||||
|
// Ignore if no address for this interface.
|
||||||
|
// @see https://github.com/ossrs/srs/issues/1087#issuecomment-408847115
|
||||||
|
if (!cur->ifa_addr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve IP address, ignore the tun0 network device, whose addr is NULL.
|
// retrieve IP address, ignore the tun0 network device, whose addr is NULL.
|
||||||
// @see: https://github.com/ossrs/srs/issues/141
|
// @see: https://github.com/ossrs/srs/issues/141
|
||||||
bool ipv4 = (cur->ifa_addr->sa_family == AF_INET);
|
bool ipv4 = (cur->ifa_addr->sa_family == AF_INET);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue