diff --git a/src/kademlia/node.cpp b/src/kademlia/node.cpp index 0d06d9b1d..ca6547e6e 100644 --- a/src/kademlia/node.cpp +++ b/src/kademlia/node.cpp @@ -228,6 +228,15 @@ void node_impl::incoming(msg const& m) char y = *(y_ent->string_ptr()); lazy_entry const* ext_ip = m.message.dict_find_string("ip"); + + // backwards compatibility + if (ext_ip == NULL) + { + lazy_entry const* r = m.message.dict_find_dict("r"); + if (r) + ext_ip = r->dict_find_string("ip"); + } + #if TORRENT_USE_IPV6 if (ext_ip && ext_ip->string_length() >= 16) { @@ -316,6 +325,7 @@ namespace a["port"] = listen_port; a["token"] = i->second; a["seed"] = int(seed); + // TODO: 3 if uTP is enabled, we should say "implied_port": 1 node.m_rpc.invoke(e, i->first.ep(), o); } }