Project

General

Profile

Actions

Bug #3676

closed

WebSocketTransport/StaticPropertiesNonLocalIpv4 RemoteUri mismatch

Added by Junxiao Shi over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
07/18/2016
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Face/TestWebSocketTransport/StaticPropertiesNonLocalIpv4 test case picks an IP address from an available NIC, creates a WebSocket server to listen on an endpoint with this IP address, creates a WebSocket client to connect to the server endpoint, and then constructs a WebSocketTransport from a connect handle accepted by the WebSocket server.

The test case then expects the WebSocketTransport to report the initially picked IP address on both LocalUri and RemoteUri fields.

However, this fails in one instance https://travis-ci.org/yoursunny/ndn-cxx-breaks/jobs/145665660#L2147-L2150:

1468878712.221268 INFO: [WebSocketTransport] [id=0,local=ws://172.17.0.1:20070,remote=wsclient://10.128.0.98:36287] Creating transport
../tests/daemon/face/websocket-transport.t.cpp(243): error in "StaticPropertiesNonLocalIpv4": check transport->getRemoteUri().getHost() == address.to_string() failed [10.128.0.98 != 172.17.0.1]

The test case assumes the underlying socket of WebSocket client would choose the same IP address, given that IP address belongs to an available NIC.
However, this assumption isn't always true. Certain configuration of the IP routing table could cause a different IP address being chosen for the WebSocket client, so that RemoteUri seen on server-side connect handle would have an unexpected IP address.

Actions

Also available in: Atom PDF