Age | Commit message (Collapse) | Author |
|
like:
src/shared/install.c: In function ‘unit_file_lookup_state’:
src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
return r < 0 ? r : state;
^
src/shared/install.c:1796:13: note: ‘r’ was declared here
int r;
^
|
|
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
|
|
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656.
It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
|
|
|
|
|
|
Like Infiniband. See RFC 4390 section 2.1 for details on DHCP
and Infiniband; chaddr is zeroed, hlen is set to 0, and htype
is set to ARPHRD_INFINIBAND because IB hardware addresses
are 20 bytes in length.
|
|
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory.
|
|
Don't overflow unnecessarily.
|
|
For now we simply take these values from the server's address.
|
|
Force renewing with a pool size of 0 would return the uninitialized r.
|
|
|
|
|
|
The timeouts in the networking library (DHCP lease timeouts and similar) should not be affected
by suspend. In the cases where CLOCK_BOOTTIME is not implemented, it is still safe to fallback to
CLOCK_MONOTONIC, as the consumers of the library (i.e., networkd) _should_ renew the leases when
coming out of suspend.
|
|
It complains about optoffset possibly being uninitialized. It is wrong,
but let's just initialize it.
|
|
|
|
The short lease was useful for testing, but in real-world usage it is pointless to keep leases
this short. That said, the cost of lease renewal is really low, so we keep the lease still
relatively short at one hour to not get into hard-to-hit problems with lease exhaustion etc.
|
|
The destination IP address should be INADDR_BROADCAST, but was
accidentally left as INADDR_ANY.
|
|
Removes _cleanup_dhcp_lease_free_. While the automatic cleanup
functions are great to have this one is never used and causes
a warning in clang.
|
|
No need to use HASHMAP_ITERATE when we destruct all entries anyway.
|
|
We must use free instead of dhcp_lease_free here to avoid freeing
client_id.data.
|
|
|
|
|
|
Make sure we don't hand out the same IP twice. We still don't
handle lease expiry.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We would like to use the UDP socket, but we cannot as we need to specify
the MAC address manually.
|
|
Parse the maximum message size the client can accept and the client id, falling back to
sane defaults if they are not set.
|
|
|
|
We will (at least at first), restrict our focus to running the server
on at most one interface.
|
|
Bind to UDP socket and listen for messages, discarding anything we receive.
|
|
|