fail to register prefix with NFD-android using NDN-DOT-NET library
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?
Updated by Yanbiao Li about 3 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.
Updated by Jeff Thompson about 3 years ago
- Status changed from New to Feedback
I pushed a fix to implement isLocal() using the .NET IsLoopback.
It works on macOS, but I haven't tested it on Android. Can you pull the latest from GitHub and try it?