Bug #4474
closedFaceUri throws "Malformed URI" for IPv6 UDP multicast address
100%
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
Updated by Junxiao Shi almost 7 years ago
- Related to Feature #4324: FaceUri: per-scheme parsing added
Updated by Davide Pesavento almost 7 years ago
- Description updated (diff)
- Target version set to v0.7
Updated by Junxiao Shi almost 7 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.
Updated by Davide Pesavento almost 7 years ago
- Related to Feature #1428: TCP/UDP face with link-local IPv6 address added
Updated by Davide Pesavento almost 7 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.
Updated by Davide Pesavento almost 7 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
Updated by Junxiao Shi almost 7 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.
Updated by Davide Pesavento almost 7 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 '%'.
Updated by Davide Pesavento almost 7 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.
Updated by Junxiao Shi almost 7 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.
Updated by Davide Pesavento almost 7 years ago
- Status changed from Code review to Closed