Add --shared-network DHCP configuration.

This commit is contained in:
Simon Kelley
2019-03-27 22:33:28 +00:00
parent 305ffb5ef0
commit ae5b7e04a1
8 changed files with 333 additions and 135 deletions

View File

@@ -910,6 +910,16 @@ struct dhcp_context {
struct dhcp_context *next, *current;
};
struct shared_network {
int if_index;
struct in_addr match_addr, shared_addr;
#ifdef HAVE_DHCP6
/* shared_addr == 0 for IP6 entries. */
struct in6_addr match_addr6, shared_addr6;
#endif
struct shared_network *next;
};
#define CONTEXT_STATIC (1u<<0)
#define CONTEXT_NETMASK (1u<<1)
#define CONTEXT_BRDCAST (1u<<2)
@@ -1107,6 +1117,7 @@ extern struct daemon {
struct ping_result *ping_results;
FILE *lease_stream;
struct dhcp_bridge *bridges;
struct shared_network *shared_networks;
#ifdef HAVE_DHCP6
int duid_len;
unsigned char *duid;