Commit Graph

10220 Commits (ipv6)
 

Author SHA1 Message Date
Lukas Werling d7659713dc Implement Happy Eyeballs for C4Network2HTTPClient
This should make masterserver requests more reliable for users with a
bad IPv6 connection.

See RFC6555
2017-01-15 20:20:49 +01:00
Lukas Werling f9c97e91f0 Allow adding connections from other addresses
Forcing a static address does not work for IPv6 where everyone has
multiple addresses that change over time. For example, adding a new
connection would fail if the preferred privacy address changes during
a game.
2017-01-15 17:43:32 +01:00
Lukas Werling b595e96b83 Fix adding connections to link-local IPv6 addresses 2017-01-15 17:35:30 +01:00
Lukas Werling cc1335fef9 Serialize addresses in UDP connection packages
The previous approach of just embedding the raw struct fails miserably
when trying to transfer AF_INET6 across platforms.
2017-01-14 23:29:16 +01:00
Lukas Werling 6addce2f95 Don't try to enable dual stack for IPv4 TCP sockets
When connecting via TCP, C4NetIO still creates IPv4 sockets, so no dual
stack option is required.
2017-01-13 23:03:50 +01:00
Lukas Werling 7411e458a0 Fix IPv6 sockets on Windows not being dual-stack
On Linux, all IPv6 sockets are dual-stack per default; on Windows, they
are not. It's still a good idea to set the option on Linux as well as
the default value can be changed.
2017-01-13 22:22:41 +01:00
Lukas Werling 23078c6e69 Fix missing IPv6 defines on Mac 2017-01-13 18:48:59 +01:00
Lukas Werling 76327b62a7 Change C4NetIOUDP broadcast to IPv6
It's not actually used anywhere, but it's not broken now!

This also moves the low-level and OS-specific GetLocalAddresses code to
C4NetIO where it's fitting better than in C4Network2Client.
2017-01-13 18:32:11 +01:00
Lukas Werling fd857ef771 Improve "unexpected address family" asserts 2017-01-13 18:32:11 +01:00
Lukas Werling 16b511b75d Use UDP address from puncher to derive TCP address
This is necessary for dual stack connections where the masterserver will
only an IPv6 address and the netpuncher will only return a UDP address/port.
2017-01-13 18:32:11 +01:00
Lukas Werling 33a32cb6bd Implement netpunching for IPv6 2017-01-13 18:32:01 +01:00
Lukas Werling c94b4cc3b0 Remove ResolveAddress()
As setting a default port is a common operation, add a helper function
for this.
2017-01-09 20:35:44 +01:00
Lukas Werling 60560125dc Fix local network discovery 2017-01-09 20:35:43 +01:00
Lukas Werling 65d8c11450 netpuncher: Add runtime error handling
Previously, the netpuncher would just exit silently when encountering an
error.
2017-01-09 20:35:43 +01:00
Lukas Werling 725e99bb9c Convert addresses from puncher to IPv4
Addresses from the puncher would show as [::ffff:1.2.3.4] and be a bit
confusing.
2017-01-09 20:35:43 +01:00
Lukas Werling f4bfd8c080 Remove obsolete CompileFunc for in_addr 2017-01-09 20:35:43 +01:00
Lukas Werling 758e7ca41e Change (discovery) multicast to IPv6
We use ff02::1 as discovery multicast address.

This "all nodes" multicast address is good enough for discovery in the
local network as packets there are likely broadcasted over ethernet
anyways.
2017-01-09 20:35:04 +01:00
Lukas Werling 0137c5f929 Fix host connections on link-local IPv6 addresses
Link-local IPv6 addresses are valid on all interfaces and thus need an
interface specifier / scope id, e.g. fe80::1%eth0.

This commit adds scope ids for initial host connections only. While not
optimal, this is probably enough in practise as the link-local addresses
are likely only important when there is no internet connectivity. In
this case, connecting clients directly is less of an advantage.
2017-01-09 20:35:04 +01:00
Lukas Werling 5d803d3be3 Improve "could not find connection" error message 2017-01-09 20:35:04 +01:00
Lukas Werling 1925f47440 Fix C4NETIO_DEBUG option 2017-01-09 20:35:04 +01:00
Lukas Werling 6c7d8b7bbb Clarify discovery error message 2017-01-09 20:35:04 +01:00
Lukas Werling 592ef85672 Fix local IPv6 address discovery 2017-01-09 20:35:04 +01:00
Nicolas Hake 102047f537 Implement IPv6 support to C4NetIO 2017-01-09 20:34:43 +01:00
Clonkonaut 3fe83986ce Crash: made airplane invincible (#1754). 2017-01-03 23:03:51 +01:00
Clonkonaut fc9a25d215 Fixed fuse positioning when creating a new one.
Fuses were created at 0,0 and everything looked ugly!
2017-01-03 22:45:20 +01:00
Clonkonaut b7771d6906 Krakatoa: fix goal icon. 2017-01-03 22:35:24 +01:00
Clonkonaut 92f5eda3e9 Locomotive: fixed goal icon. 2017-01-03 22:33:45 +01:00
Clonkonaut a8d0f8f75e Chine: fix goal icon. 2017-01-03 22:30:33 +01:00
Clonkonaut d901a8952a Acid Rift: fixed superfluous declaration of global vars. 2017-01-03 22:25:50 +01:00
Clonkonaut 0eed215bbd Clonkomotive: fixed (deprecated) implicit declaration of for loop var. 2017-01-03 22:11:00 +01:00
Clonkonaut 06151bc5e5 Clonkomotive: fixed superfluous declaration of global vars. 2017-01-03 22:09:52 +01:00
Clonkonaut c423ec5de2 Made airplane touchable (#1663).
Made it untouchable in all missions.
2017-01-03 22:04:48 +01:00
Maikel de Vries 2ac4f2aa97 move windmill defense sounds to general folder
So that other rounds can use them as well.
2017-01-03 18:16:32 +01:00
Mark 83486fceb8 Control: Format scripts 2017-01-03 18:04:10 +01:00
Mark fa28a7a643 Control: Extract library for using menus
External packs use this functionality without using the whole default Clonk control.
2017-01-03 18:03:49 +01:00
Mark 39c54c323c Control: Extract library for using objects
External packs use this functionality without using the whole default Clonk control.
2017-01-03 18:03:32 +01:00
Maikel de Vries 577da1566a fix defense home base menu buy icon 2017-01-03 17:56:03 +01:00
Maikel de Vries 422207b54d add icons for buying and selling 2017-01-03 17:56:03 +01:00
Clonkonaut e6af3d216a Treasure Hunt: fixed superfluous declaration of global vars. 2017-01-03 16:50:13 +01:00
Clonkonaut b984704812 Raid: fixed superfluous declaration of global vars. 2017-01-03 16:38:47 +01:00
Clonkonaut 1fb8e4f757 Deep Sea Mining: Fixed crystal communicator graphics position. 2017-01-03 16:29:22 +01:00
Clonkonaut e2b238c381 Deap Sea Mining: fixed superfluous declaration of global vars. 2017-01-03 15:56:20 +01:00
Clonkonaut 7ec3f90127 Dark Castle: fixed airplane health hack to correct property name. 2017-01-03 15:49:52 +01:00
Clonkonaut 99d4fcb5ba Dark Castle: fixed superfluous declaration of global vars. 2017-01-03 15:48:39 +01:00
Clonkonaut 4fce224238 Crash: adjusted merchant dialogue to new flag behaviour. 2017-01-03 03:56:52 +01:00
Clonkonaut 145be7d097 Mt Brame: fixed goal icon. 2017-01-03 03:41:05 +01:00
Clonkonaut 7be2bd33fa Moved airplane smoke a bit out of the way and made less prominent, added water stirring effect when flying low! 2017-01-03 01:55:18 +01:00
Maikel de Vries efed830df3 fix liquid container accepting materials and show them in interaction menu 2017-01-02 18:33:14 +01:00
Maikel de Vries 8fa5de35a9 fix airplane parachute mode 2017-01-02 18:29:23 +01:00
Maikel de Vries c5590d851a add liquid test which causes an error on material change 2017-01-02 09:17:54 +01:00