Project

General

Profile

Actions

Bug #4474

closed

FaceUri throws "Malformed URI" for IPv6 UDP multicast address

Added by Ashlesh Gawande about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Network
Target version:
Start date:
01/24/2018
Due date:
% Done:

100%

Estimated time:

Description

NLSR passes in the URI it gets from NFD Face Creation Event to FaceUri
(https://github.com/named-data/NLSR/blob/563611eb20ff9a6d9e22f446f8a813cb32e811c0/src/nlsr.cpp?utf8=%E2%9C%93#L460)
and gets a Malformed error, example:

Malformed URI: udp6://[ff02::1234%a-eth0]:56363

Related issues 2 (1 open1 closed)

Related to ndn-cxx - Feature #4324: FaceUri: per-scheme parsingIn ProgressDavide Pesavento

Actions
Related to NFD - Feature #1428: TCP/UDP face with link-local IPv6 addressClosedYanbiao Li

Actions
Actions #1

Updated by Junxiao Shi about 6 years ago

Actions #2

Updated by Davide Pesavento about 6 years ago

  • Description updated (diff)
  • Target version set to v0.7
Actions #3

Updated by Junxiao Shi about 6 years ago

FaceUri parser is not recognizing the device name part correctly.
Device name rules are quite relaxed, see dev_valid_name.
There’s probably additional encoding when converting to IPv6 link local address.

Actions #4

Updated by Davide Pesavento about 6 years ago

  • Related to Feature #1428: TCP/UDP face with link-local IPv6 address added
Actions #5

Updated by Davide Pesavento about 6 years ago

Junxiao Shi wrote:

FaceUri parser is not recognizing the device name part correctly.

Yes, we're only accepting [a-zA-Z0-9]+, which is wrong.

There’s probably additional encoding when converting to IPv6 link local address.

I don't understand this sentence.

Actions #6

Updated by Davide Pesavento about 6 years ago

  • Subject changed from FaceUri throws malformed URI for IPv6 UDP multicast address to FaceUri throws "Malformed URI" for IPv6 UDP multicast address
  • Status changed from New to Code review
  • Assignee set to Davide Pesavento
  • % Done changed from 0 to 100
Actions #7

Updated by Junxiao Shi about 6 years ago

There’s probably additional encoding when converting to IPv6 link local address.

I wonder what happens if interface name contains % ] or other characters that cannot appear in URI. I couldn’t find answers in kernel, libpcap, or getsockaddr (of Python) sources.

Eventually we should canonize zone index to the numeric form, but that’s left for another issue.

Actions #8

Updated by Davide Pesavento about 6 years ago

Junxiao Shi wrote:

There’s probably additional encoding when converting to IPv6 link local address.

I wonder what happens if interface name contains % ] or other characters that cannot appear in URI. I couldn’t find answers in kernel, libpcap, or getsockaddr (of Python) sources.

That's an URI encoding issue. Kernel, libpcap, getsockaddr don't deal with URIs.

According to the URI RFC, all reserved chars should be escaped. IIRC however, Alex decided to ignore this rule at least for '%'.

Actions #9

Updated by Davide Pesavento about 6 years ago

In any case, change 4474 is intended to be a quick fix, since the FaceUri parser is being completely rewritten in #4324 anyway. We can decide to reject weird characters in interface names (only accept e.g. '-' and '_') if that simplifies things for now. If anyone is using weird characters to name interfaces, they should be shot.

Actions #10

Updated by Junxiao Shi about 6 years ago

We can decide to reject weird characters in interface names (only accept e.g. '-' and '_') if that simplifies things for now.

Yes rejecting some chars is fine.

they should be shot.

See https://github.com/named-data/NFD/blob/97a010178c0bd340babb3dfabcc6f8f6abbaef42/CODE_OF_CONDUCT.md "our standards" section.

Actions #11

Updated by Davide Pesavento about 6 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF