Commit graph

7 commits

Author SHA1 Message Date
SASANO Takayoshi
88bbb0cd0f use getaddrinfo() AI_PASSIVE flag, to remove "::" and "0.0.0.0" 2020-04-06 18:35:12 +09:00
SASANO Takayoshi
dad47317e6 set INADDR_ANY/IN6ADDR_ANY_INIT address string to m_socket
when CUDPSocket::open() is called with m_address (in CUDPSocket) is nothing,
IPv4 socket is created by "0.0.0.0" (INADDR_ANY) address.

This causes a problem that DMRGateway cannot connect to reflector on IPv6.
To choose default INADDR_ANY/IN6ADDR_ANY_INIT address, added
open(address_family) in UDPSocket.cpp.

Following code sets address string at construction, not modified.
	NXDNNetwork.cpp
	POCSAGNetwork.cpp
	YSFNetwork.cpp

Other codes does not set, modified open() -> open(address_family)
	DMRNetwork.cpp
	DStarNetwork.cpp
	MMDVMHost.cpp
	MobileGPS.cpp
	P25Network.cpp
	RemoteCommand.cpp
	RemoteControl.cpp

I think there is more clever method, but I have no other idea.

Maybe IPv6 support for digital radio works, but RemoteControl can work
IPv4 only.
2020-04-06 18:35:12 +09:00
SASANO Takayoshi
5dccd5c5ce add match(), isnone() utility function
match() checks address family, IP address and port between
two sockaddr_storages.

isnone() checks sockaddr_storage has INADDR_NONE IPv4 address.
(sockaddr_storage has this address when lookup() failed)
2020-03-28 04:37:51 +09:00
SASANO Takayoshi
022d1a768b add IPv6 support (code from DAPNETGateway-IPv6) 2020-03-27 06:25:54 +09:00
Jonathan Naylor
5c6e0ea4c1 Fix assert error. 2016-04-04 17:00:59 +01:00
Jonathan Naylor
8860b72e6c Changes based on debugging. 2016-01-25 22:36:16 +00:00
Jonathan Naylor
d34d85c04b Initial commit 2016-01-14 18:45:04 +00:00