relaxed handling of ipV6 search response address
This commit is contained in:
6
TODO
6
TODO
@@ -4,8 +4,8 @@
|
||||
// should be called without any lock hold
|
||||
// TODO in Java as in C++ ? reportChannelStateChange();
|
||||
|
||||
- searching of channel with server address specified
|
||||
- improve searching of channel with server address specified
|
||||
|
||||
- void transportUnresponsive() { not implemented (also in Java)
|
||||
- complete authNZ
|
||||
- improve RPCClient (as it is in Java)
|
||||
- complete authNZ (callback on right change)
|
||||
- request event on disconnect/destroy, etc.?
|
||||
|
||||
@@ -70,7 +70,9 @@ bool decodeAsIPv6Address(ByteBuffer* buffer, osiSockAddr* address) {
|
||||
// first 80-bit are 0
|
||||
if (buffer->getLong() != 0) return false;
|
||||
if (buffer->getShort() != 0) return false;
|
||||
if (buffer->getShort() != (int16)0xFFFF) return false;
|
||||
int16 ffff = buffer->getShort();
|
||||
// allow all zeros address
|
||||
//if (ffff != (int16)0xFFFF) return false;
|
||||
|
||||
uint32_t ipv4Addr =
|
||||
((uint32_t)(buffer->getByte()&0xFF))<<24 |
|
||||
@@ -78,6 +80,9 @@ bool decodeAsIPv6Address(ByteBuffer* buffer, osiSockAddr* address) {
|
||||
((uint32_t)(buffer->getByte()&0xFF))<<8 |
|
||||
((uint32_t)(buffer->getByte()&0xFF));
|
||||
|
||||
if (ffff != (int16)0xFFFF && ipv4Addr != (uint32_t)0)
|
||||
return false;
|
||||
|
||||
address->ia.sin_addr.s_addr = htonl(ipv4Addr);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user