Commit Diff


commit - ed1844176011f28206a6be689f50b68a591770b1
commit + 3ce23c08d0d60bb7cba4f349d1a95b893d6b8e0b
blob - 48cb569a1a8b1a6a87f1a766c432cf90964d7714
blob + 3ce533e8520bb1bafe37c936a01db0994c3db5c2
--- if.c
+++ if.c
@@ -1535,7 +1535,7 @@ pack_ifaliasreq(struct ifaliasreq *ip4req, ip_t *ip,
 	sin = (struct sockaddr_in *)&ip4req->ifra_mask;
 	sin->sin_family = AF_INET;
 	sin->sin_len = sizeof(struct sockaddr_in);
-	mask = htonl(0xffffffff << (32 - ip->bitlen));
+	mask = htonl(0xffffffffULL << (32 - ip->bitlen));
 	memcpy(&sin->sin_addr.s_addr, &mask, sizeof(in_addr_t));
 	/* set destination/broadcast address */
 	if (in4dest->s_addr != 0) {
blob - adb114ae6c074ebf5616d2275f6b953f8f377bcf
blob + e589a9248c616b92452683464991fe98de5758ca
--- route.c
+++ route.c
@@ -206,7 +206,7 @@ route(int argc, char **argv)
 	switch (dest.family) {
 	case AF_INET:
 		net = in4_netaddr(dest.addr.in.s_addr,
-		    (u_int32_t)htonl(0xffffffff << (32 - dest.bitlen)));
+		    (u_int32_t)htonl(0xffffffffULL << (32 - dest.bitlen)));
 		if (ntohl(dest.addr.in.s_addr) != net) {
 			tmp.s_addr = htonl(net);
 			printf("%% Inconsistent address and mask (%s/%i?)\n",