From 763d3135705ea1db3e4b093e2173cfb4cddae21c Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 21 Jun 2016 19:05:22 -0400 Subject: [PATCH 1/2] fix bug in enum_net() for BSD and Mac --- ChangeLog | 1 + simulation/libsimulator | 2 +- src/enum_net.cpp | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10ac5eeff..7d7dbbd36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 1.1.1 release + * fix bug in enum_net() for BSD and Mac * fix bug in python binding of announce_entry * fixed bug related to flag_merge_resume_http_seeds flag in add_torrent_params * fixed inverted priority of incoming piece suggestions diff --git a/simulation/libsimulator b/simulation/libsimulator index f0e42435d..0c796e3e0 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit f0e42435dce3ff227cc81b17ccab143b21d8f771 +Subproject commit 0c796e3e0dea7ca05eef3ded2cf3806ef19a1413 diff --git a/src/enum_net.cpp b/src/enum_net.cpp index 16ced9399..7d612bb80 100644 --- a/src/enum_net.cpp +++ b/src/enum_net.cpp @@ -275,6 +275,7 @@ int _System __libsocket_sysctl(int* mib, u_int namelen, void *oldp, size_t *oldl , rt_info->destination.is_v4() ? AF_INET : AF_INET6); if_indextoname(rtm->rtm_index, rt_info->name); + // TODO: get the MTU (and other interesting metrics) from the rt_msghdr instead ifreq req; memset(&req, 0, sizeof(req)); if_indextoname(rtm->rtm_index, req.ifr_name); @@ -884,8 +885,11 @@ namespace libtorrent for (char* next = buf.get(); next < end; next += rtm->rtm_msglen) { rtm = reinterpret_cast(next); - if (rtm->rtm_version != RTM_VERSION) + if (rtm->rtm_version != RTM_VERSION + || rtm->rtm_type != RTM_ADD) + { continue; + } ip_route r; if (parse_route(s, rtm, &r)) ret.push_back(r); From 916f8043c12b40a7542dc31786dfab628d5fa120 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 22 Jun 2016 00:33:21 -0400 Subject: [PATCH 2/2] restore libsimulator submodule for msvc-12 --- simulation/libsimulator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulation/libsimulator b/simulation/libsimulator index 0c796e3e0..f0e42435d 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit 0c796e3e0dea7ca05eef3ded2cf3806ef19a1413 +Subproject commit f0e42435dce3ff227cc81b17ccab143b21d8f771