summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-lease.c
AgeCommit message (Collapse)Author
2015-01-28sd-dhcp: chop of trailing dot of DHCP supplied host and domain namsLennart Poettering
2015-01-13refcnt: refcnt is unsigned, fix comparisonsTom Gundersen
This does not make a difference, but the code was confusing.
2014-11-28treewide: more log_*_errno + return simplificationsMichal Schmidt
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
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().
2014-11-20sd-dhcp-lease: fix copy-paste error asserting wrong function argumentThomas Haller
2014-11-19sd-dhcp-lease: load/save client IDDan Williams
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.
2014-11-18sd-dhcp-lease: expose load/save functionsTom Gundersen
Based on patch by Dan Williams.
2014-11-01sd-dhcp-lease: use shared default prefixlen functionTom Gundersen
Also change the default prefixlen function to only access the first octet of the in_addr.
2014-11-01sd-dhcp-lease: use unaligned read helpersTom Gundersen
2014-10-27shared: in-addr-utils - add default_subnet_mask and default_prefixlen methodsTom Gundersen
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.
2014-08-15dhcp: the localhost isn't valid as hostname eitherLennart Poettering
2014-08-15sd-dhcp-lease: verify hostname and domainnames we receiveTom Gundersen
2014-07-23networkd: merge DNS and NTP entries when exportingTom Gundersen
In the state files, do not distinguish where the various entries came from (static or DHCP), but include them all in the same list.
2014-07-17sd-network: remove redundant array size parameter from functions that return ↵Lennart Poettering
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.
2014-06-29Add support for DHCP static route optionsEugene Yakubovich
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.
2014-06-29sd-dhcp-client/networkd: set lifetimes for IPv4 addressesPatrik Flykt
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]
2014-05-20dhcp-lease: add support for parsing a few more dhcp optionsTom Gundersen
2014-05-20dhcp-lease: refactor lease parsingTom Gundersen
Use helper functions, and add some more sanity checking/asserts.
2014-05-19sd-dhcp-lease/sd-network: modernization and fix leakTom Gundersen
2014-05-19sd-dhcp-lease: move in_addr (de)serialization to shared network codeTom Gundersen
2014-04-30networkd: dont configure route if lease doesn't have oneUmut Tezduyar Lindskog
2014-04-29sd-dhcp-lease: fix double reallocTom Gundersen
2014-04-29sd-dhcp-lease: (de)serialize DNS and NTP serversTom Gundersen
Also use inet_ntoa rather than inet_ntop.
2014-04-29sd-dhcp-leaes: use newdup()Tom Gundersen
2014-04-29sd-dhcp-lease: add NTP supportTom Gundersen
Export the NTP servers so timesyncd can use them.
2014-04-12test-dhcp-client: unref lease objects to make valgrind happyZbigniew Jędrzejewski-Szmek
Also unref client objects in test code, and initalize logging, to DEBUG by default.
2014-03-21sd-dhcp-client: add fallback subnet masksTom Gundersen
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.
2014-03-14networkd: fix creation of runtime dirs at startupTom Gundersen
This allows us to drop the repeated attempted creations of the runtime dirs during runtime.
2014-03-03sd-dhcp-lease: add sd_dhcp_lease_get_next_server()Tom Gundersen
2014-03-03sd-dhcp-lease: add sd_dhcp_lease_get_server_identifier()Tom Gundersen
2014-03-03sd-dhcp-lease: add Root Path supportTom Gundersen
This is necessary when mounting /dev/nfs based on a DHCP lease.
2014-02-28sd-network: add new libraryTom Gundersen
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.