From: Roy Marples Date: Thu, 17 Jul 2008 12:26:58 +0000 (+0000) Subject: Fix IPv4LL netmask and broadcast on big endian. X-Git-Tag: v4.0.2~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9576e90c178a6a8a5461d7c969b2206fec752015;p=thirdparty%2Fdhcpcd.git Fix IPv4LL netmask and broadcast on big endian. --- diff --git a/client.c b/client.c index 4d62c382..6a5760a4 100644 --- a/client.c +++ b/client.c @@ -359,13 +359,13 @@ ipv4ll_get_dhcp(uint32_t old_addr) /* Put some LL options in */ p = dhcp->options; *p++ = DHCP_SUBNETMASK; - *p += sizeof(u32); - u32 = LINKLOCAL_MASK; + *p++ = sizeof(u32); + u32 = htonl(LINKLOCAL_MASK); memcpy(p, &u32, sizeof(u32)); p += sizeof(u32); *p++ = DHCP_BROADCAST; - *p += sizeof(u32); - u32 = LINKLOCAL_BRDC; + *p++ = sizeof(u32); + u32 = htonl(LINKLOCAL_BRDC); memcpy(p, &u32, sizeof(u32)); p += sizeof(u32); *p++ = DHCP_END;