Age | Commit message (Collapse) | Author |
|
|
|
This does not make a difference, but the code was confusing.
|
|
|
|
It corrrectly handles both positive and negative errno values.
|
|
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno().
|
|
|
|
The lease is usually tied to the client ID, so users of the
lease may want to know what client ID it was acquired with.
|
|
Based on patch by Dan Williams.
|
|
Also change the default prefixlen function to only access the first octet of the in_addr.
|
|
|
|
These use the (deprecated) IPv4 address classes to deduce the corresponding subnet masks. This is useful when addresses
without subnet masks and prefix lengths are given.
Make use of these new functions from sd-dhcp-lease.
|
|
|
|
|
|
In the state files, do not distinguish where the various entries came from
(static or DHCP), but include them all in the same list.
|
|
arrays
As long as the number of array entries is relatively small it's nicer to
simply return the number of entries directly, instead of using a size_t*
return parameter for it.
|
|
This adds support for DHCP options 33 and 121: Static Route and
Classless Static Route. To enable this feature, set UseRoutes=true
in .network file. Returned routes are added to the routing table.
|
|
Note that /proc/sys/net/ipv4/ip_dynaddr needs to be non-zero.
[tomegun: hook up DHCP renew events to increase the lifetime when necessary]
|
|
|
|
Use helper functions, and add some more sanity checking/asserts.
|
|
|
|
|
|
|
|
|
|
Also use inet_ntoa rather than inet_ntop.
|
|
|
|
Export the NTP servers so timesyncd can use them.
|
|
Also unref client objects in test code, and initalize logging,
to DEBUG by default.
|
|
The DHCP RFC does not require the DHCP server to send a subnet mask, so if it
is missing, let's try to use the default subnet masks based on address class.
In case the class the address belongs to does not have a default subnet mask,
we fail as before.
Also improve logging when handling invalid dhcp messages, and simply ignore them
rather than stop the whole dhcp client.
|
|
This allows us to drop the repeated attempted creations of the runtime dirs during runtime.
|
|
|
|
|
|
This is necessary when mounting /dev/nfs based on a DHCP lease.
|
|
This is similar to sd-login, but exposes the state of networkd rather than logind.
Include it in libsystemd-dhcp and rename it to libsystemd-network.
|