Add --dhcp-split-relay option.

This makes a DHCPv4 relay which is functional when
client and server networks aren't mutually route-able.
This commit is contained in:
Simon Kelley committed 2025-07-27 15:27:40 +01:00
1 parent ea5b0e64e2
commit fc9f6985ab
8 files changed
+247 -127

No files matched your search

+3
View File
@@ -1148,6 +1148,7 @@ struct dhcp_relay {
char *interface; /* Allowable interface for replies from server, and dest for IPv6 multicast */
int iface_index; /* working - interface in which requests arrived, for return */
int port; /* Port of relay we forward to. */
int split_mode; /* Split address allocation and relay address. */
#ifdef HAVE_SCRIPT
struct snoop_record {
struct in6_addr client, prefix;
@@ -1666,6 +1667,8 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
time_t recvtime, struct in_addr leasequery_source);
unsigned char *extended_hwaddr(int hwtype, int hwlen, unsigned char *hwaddr,
int clid_len, unsigned char *clid, int *len_out);
void relay_upstream4(int iface_index, struct dhcp_packet *mess, size_t sz, int unicast);
struct dhcp_relay *relay_reply4(struct dhcp_packet *mess, char *arrival_interface);
#endif
/* dnsmasq.c */