bzflag
bzflag copied to clipboard
IPv6
This should be ready to merge. Sources and plugins build. one.bzflag.org:5154 and one.bzflag.org:5155 both running my fork.
- Address now contains sockaddr_in6.
- Server starts listening on ipv6 :: by default.
- if -i 0.0.0.0 is given, server starts in ipv4 only mode.
- I have ONLY compiled on Linux. I did clear IPV6_V6ONLY which, in theory, allows Windows to use one tcp listen for both ipv4 and ipv6
- bzadmin now starts up udp which I've used for testing
- ServerId is gone
- Address(text) blocks on DNS. This could use fixing.
- udp socket follows tcp socket family
- server cache file has nameport only once per entry
- list server no longer returns ipaddr for BZFS0225 and newer. You will need to use my list server, or apply the pull request for bzfls.php.
- UDEBUGMSG uses logDebugMessage at level 5
- a number of fixes for logDebugMessages calls that tried to be on one line. With datestamp, that's broken
- work around no bundle for debug logging in bzfs and bzadmin
- deleted internal "name:port ; description". Now description is just description.
- wildcard IP bans are NO LONGER SUPPORTED. They need to be converted to cidr format.
There's still remaining build errors and warnings with Visual Studio.
In Address::getIPVersion(), sin6_family is of type ADDRESS_FAMILY, which is typedef'ed to be an unsigned short with Winsock, so there's a warning about a loss of data converting it to an uint8_t. There's the same warning in Address::pack(...) for buf = (unsigned char*)nboPackUByte(_buf, addr.sin6_family);. We probably want to have our own defines for this anyway since the value for AF_INET6 on Windows is 23 but it is 10 on Linux.
Then there's a bunch of errors about __in6_u not being a member of in6_addr (which is the type of sin6_addr used in quite a number of places). With Winsock, the in6_addr type only has a u member with further has unsigned char Byte[16] and unsigned short Word[8] members, so it doesn't look like Winsock exposes 32-bit chunks of an IPv6 address.
I've been busy with other projects, sorry. I want to get windows builds working for me locally. If port is being cast to a uint8 someplace, that's a bug. Ports should be 16 bit.
It was the address family being cast to uint8_t, not the port.