1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #141, support tun0(vpn network device) ip retrieve. 0.9.179.

This commit is contained in:
winlin 2014-07-31 10:37:34 +08:00
parent b5e5dad8b1
commit f0ffdcc0ae
3 changed files with 9 additions and 1 deletions

View file

@ -207,6 +207,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.<br/> * 2013-10-17, Created.<br/>
## History ## History
* v1.0, 2014-07-31, fix [#141](https://github.com/winlinvip/simple-rtmp-server/issues/141), support tun0(vpn network device) ip retrieve. 0.9.179.
* v1.0, 2014-07-27, support build on OSX(Darwin). 0.9.177 * v1.0, 2014-07-27, support build on OSX(Darwin). 0.9.177
* v1.0, 2014-07-27, api connections add udp, add disk iops. 0.9.176 * v1.0, 2014-07-27, api connections add udp, add disk iops. 0.9.176
* v1.0, 2014-07-26, complete config utest. 0.9.173 * v1.0, 2014-07-26, complete config utest. 0.9.173

View file

@ -930,6 +930,13 @@ void retrieve_local_ipv4_ips()
while (p != NULL) { while (p != NULL) {
sockaddr* addr = p->ifa_addr; sockaddr* addr = p->ifa_addr;
// ignore the tun0 network device,
// which addr is NULL.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/141
if (!addr) {
continue;
}
// retrieve ipv4 addr // retrieve ipv4 addr
if (addr->sa_family == AF_INET) { if (addr->sa_family == AF_INET) {
in_addr* inaddr = &((sockaddr_in*)addr)->sin_addr; in_addr* inaddr = &((sockaddr_in*)addr)->sin_addr;

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR "0" #define VERSION_MAJOR "0"
#define VERSION_MINOR "9" #define VERSION_MINOR "9"
#define VERSION_REVISION "178" #define VERSION_REVISION "179"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"