Actions
Bug #1461
closedNFD crashes if system does not support IPv6
Start date:
04/10/2014
Due date:
% Done:
0%
Estimated time:
Description
In FaceManager we hard-coded that TCP and UDP factory create IPv4 and IPv6 channels:
face-manager.cpp:291:
shared_ptr<TcpChannel> ipv4Channel = factory->createChannel("0.0.0.0", port);
shared_ptr<TcpChannel> ipv6Channel = factory->createChannel("::", port);
face-manager.cpp:
shared_ptr<UdpChannel> v4Channel =
factory->createChannel("0.0.0.0", port, time::seconds(timeout));
shared_ptr<UdpChannel> v6Channel =
factory->createChannel("::", port, time::seconds(timeout));
On platforms that do not support IPv6 (but I guess, there should be a similar problem if platform doesn't support IPv4), this causes exception during Channel creation, which is caught by main:
1397168136.392115 DEBUG: [TcpFactory] Channel [[::]:6363] created
1397168136.409649 FATAL: [Main] open: Address family not supported by protocol
There could be a couple of solutions to the problem. The ideal is to provide config parameter, specifying either explicit ipv4/ipv6 addresses to listen on, or just variable to enable/disable ipv4/ipv6.
Actions