From e1ea665edac17d75fce01b72dadfa3211b60df2c Mon Sep 17 00:00:00 2001 From: Eugene Yakubovich Date: Fri, 27 Jun 2014 15:00:06 -0700 Subject: Add support for DHCP static route options 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. --- src/libsystemd-network/dhcp-lease-internal.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/libsystemd-network/dhcp-lease-internal.h') diff --git a/src/libsystemd-network/dhcp-lease-internal.h b/src/libsystemd-network/dhcp-lease-internal.h index ff09583604..d4675f3e47 100644 --- a/src/libsystemd-network/dhcp-lease-internal.h +++ b/src/libsystemd-network/dhcp-lease-internal.h @@ -32,6 +32,12 @@ #include "sd-dhcp-client.h" +struct sd_dhcp_route { + struct in_addr dst_addr; + struct in_addr gw_addr; + uint8_t dst_prefixlen; +}; + struct sd_dhcp_lease { RefCount n_ref; @@ -52,8 +58,9 @@ struct sd_dhcp_lease { size_t ntp_size; struct in_addr *policy_filter; size_t policy_filter_size; - struct in_addr *static_route; + struct sd_dhcp_route *static_route; size_t static_route_size; + size_t static_route_allocated; uint16_t boot_file_size; uint16_t mdr; uint16_t mtu; -- cgit v1.2.3-54-g00ecf