summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp-lease-internal.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-19 16:05:44 +0100
committerTom Gundersen <teg@jklm.no>2014-03-21 17:52:42 +0100
commit9e64dd72765ddc2583554ebed24eb2c824564838 (patch)
tree85f7e9394a093269adfa6ca917b203221b38bba8 /src/libsystemd-network/dhcp-lease-internal.h
parent022446adf99b84c59a88c2e614033ccde13c395c (diff)
sd-dhcp-client: add fallback subnet masks
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.
Diffstat (limited to 'src/libsystemd-network/dhcp-lease-internal.h')
-rw-r--r--src/libsystemd-network/dhcp-lease-internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp-lease-internal.h b/src/libsystemd-network/dhcp-lease-internal.h
index 70f1aa15e4..e478902e0e 100644
--- a/src/libsystemd-network/dhcp-lease-internal.h
+++ b/src/libsystemd-network/dhcp-lease-internal.h
@@ -57,5 +57,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
int dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file);
int dhcp_lease_load(const char *lease_file, sd_dhcp_lease **ret);
+int dhcp_lease_set_default_subnet_mask(sd_dhcp_lease *lease);
+
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_dhcp_lease*, sd_dhcp_lease_unref);
#define _cleanup_dhcp_lease_unref_ _cleanup_(sd_dhcp_lease_unrefp)