Project

General

Profile

Actions

Bug #4575

closed

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

Added by Yanbiao Li about 6 years ago. Updated about 6 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?

Actions #1

Updated by Anonymous about 6 years ago

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

Actions #2

Updated by Yanbiao Li about 6 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.

Actions #3

Updated by Anonymous about 6 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?

Actions #4

Updated by Yanbiao Li about 6 years ago

sure, thanks

Actions #5

Updated by Yanbiao Li about 6 years ago

it works now, thanks

Actions #6

Updated by Anonymous about 6 years ago

  • Status changed from Feedback to Closed

Great. Closing.

Actions

Also available in: Atom PDF