Project

General

Profile

Bug #1635

FaceUri does not recognize IPv4-mapped IPv6 address

Added by Wentao Shang over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Core
Target version:
Start date:
05/21/2014
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

FaceURI: wsclient://[::ffff:76.90.11.239]:56366

Expected: no error, wsclient://76.90.11.239:56366 is constructed

Actual: Malformed URI: wsclient://[::ffff:76.90.11.239]:56366

FaceUri should treat an IPv6 endpoint containing IPv4-mapped IPv6 address as the corresponding IPv4 endpoint (eg. When scheme is not specified, "tcp4" should be chosen instead of "tcp6")


Problem was discovered when using WebSocket faces.

1400690340.435746 FATAL: [NFD] Malformed URI: wsclient://[::ffff:76.90.11.239]:56366

This happens when NFD is running dual-stack WebSocket while the client is from IPv4. A temporary fix is to disable IPv6 for WebSocket faces.

History

#1 Updated by Wentao Shang over 5 years ago

  • Subject changed from WebSocket face cannot understand ipv4-embedded ipv6 address to WebSocket face cannot understand ipv4-mapped ipv6 address

#2 Updated by Alex Afanasyev over 5 years ago

  • Subject changed from WebSocket face cannot understand ipv4-mapped ipv6 address to FaceUri does not recognize ipv4-mapped ipv6 address
  • Description updated (diff)
  • Category set to Core
  • Target version set to v0.2

#3 Updated by Junxiao Shi over 5 years ago

  • Subject changed from FaceUri does not recognize ipv4-mapped ipv6 address to FaceUri does not recognize IPv4-mapped IPv6 address
  • Description updated (diff)

WebSocket++ using IPv4-mapped IPv6 addresses implies that IPv4 connectivity is not available on FreeBSD because IPv4-mapped IPv6 is disabled by default.

#4 Updated by Junxiao Shi over 5 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
  • Estimated time set to 2.00 h

#5 Updated by Junxiao Shi over 5 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 70

A closer look reveals that the bug is in FaceUri parsing routine.
This routine has no control over the scheme name.

#6 Updated by Junxiao Shi over 5 years ago

  • Status changed from Code review to Closed
  • % Done changed from 70 to 100

Also available in: Atom PDF