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);