Project

General

Profile

Bug #4575

fail to register prefix with NFD-android using NDN-DOT-NET library

Added by Yanbiao Li over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Start date:
04/10/2018
Due date:
% Done:

0%

Estimated time:

Description

we were trying to register a prefix from the APP (built on top of NDN-NOT-NET) to NFD-Android, but it failed.
But it succeeded to register the same prefix with a remote NFD.

Finally, we figured out that the reason why it fails with NFD-Andorid is: the command Interest is always started from /localhop/nfd and NFD-Andorid does not enable /localhop handler by default.
We created a TCP connection (using 127.0.0.1 as the address) between the APP and NFD-andorid, it should hit, after checking isLocal(), the branch which adopts /localhost/nfd prefix but it didn't.

Is there any issue with the isLocal() check?

#1

Updated by Jeff Thompson over 2 years ago

Do you think it would work if it used /localhost ?

#2

Updated by Yanbiao Li over 2 years ago

I would say yes.
Since the registration succeeded on the remote NFD, I think the command itself is ok. It fails with NFD-andorid is just because NFD-andorid has no clue to proceed /localhop commands.

On the other hand, I think the only difference between two cases (/localhost commands and /localhop commands) is their trust policy, configured with different parts in the config file, may be different. But, so far, we do not enable any security check toward local registrations. Therefore, I think the command succeeded with remote NFD would success with the NFD-andorid as long as the right prefix (/localhost) is adopted.

#3

Updated by Jeff Thompson over 2 years ago

  • Status changed from New to Feedback

I pushed a fix to implement isLocal() using the .NET IsLoopback.
https://github.com/named-data/ndn-dot-net/blob/2becb13e31e4714071f9c99cc6d77aed28a90ab2/src/async-tcp-transport.cs#L112

It works on macOS, but I haven't tested it on Android. Can you pull the latest from GitHub and try it?

#4

Updated by Yanbiao Li over 2 years ago

sure, thanks

#5

Updated by Yanbiao Li over 2 years ago

it works now, thanks

#6

Updated by Jeff Thompson over 2 years ago

  • Status changed from Feedback to Closed

Great. Closing.

Also available in: Atom PDF