X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Froute.c;h=4d7127959308cc0fcb6be76614469339202359ee;hp=a3e92020ce4bcc47c2aa10be772990b92cb73c61;hb=7c73cb3ace6659df58ec2382b8d47bb521dad886;hpb=d661c7c7353da90911e9f2d0195ac861d6837f5c diff --git a/src/route.c b/src/route.c index a3e92020..4d712795 100644 --- a/src/route.c +++ b/src/route.c @@ -59,6 +59,7 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr); #define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif +volatile int dummy; static timeout_t age_subnets_timeout; /* RFC 1071 */ @@ -80,6 +81,11 @@ static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { checksum = (checksum & 0xFFFF) + (checksum >> 16); } + // Work around a compiler optimization bug. + if(checksum) { + dummy = 1; + } + return ~checksum; }