summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2017-12-23 01:18:23 +0100
committerFrancis Dupont <fdupont@isc.org>2017-12-23 01:18:23 +0100
commit563f0b8aef9558a900f215dfccc571eab99a0223 (patch)
tree4d5ce8719fe415d089569f5f98ca84c944a42aaf /includes
parent0d6d300fec8b26c9e854095a4a29158186b69172 (diff)
downloadisc-dhcp-563f0b8aef9558a900f215dfccc571eab99a0223.tar.gz
Merged rt44535 (relay port)
Diffstat (limited to 'includes')
-rw-r--r--includes/config.h.in3
-rw-r--r--includes/dhcp.h2
-rw-r--r--includes/dhcp6.h2
-rw-r--r--includes/dhcpd.h8
4 files changed, 14 insertions, 1 deletions
diff --git a/includes/config.h.in b/includes/config.h.in
index 28a4cfa9..1608f671 100644
--- a/includes/config.h.in
+++ b/includes/config.h.in
@@ -157,6 +157,9 @@
/* Define to any value to include Ari's PARANOIA patch. */
#undef PARANOIA
+/* Define to 1 to include relay port support. */
+#undef RELAY_PORT
+
/* The size of `struct iaddr *', as computed by sizeof. */
#undef SIZEOF_STRUCT_IADDR_P
diff --git a/includes/dhcp.h b/includes/dhcp.h
index c9c482d0..0a74137e 100644
--- a/includes/dhcp.h
+++ b/includes/dhcp.h
@@ -183,6 +183,8 @@ struct dhcp_packet {
#define RAI_REMOTE_ID 2
#define RAI_AGENT_ID 3
#define RAI_LINK_SELECT 5
+/* not yet assigned but next free value */
+#define RAI_RELAY_PORT 19
/* FQDN suboptions: */
#define FQDN_NO_CLIENT_UPDATE 1
diff --git a/includes/dhcp6.h b/includes/dhcp6.h
index b51bac26..c78501c6 100644
--- a/includes/dhcp6.h
+++ b/includes/dhcp6.h
@@ -115,6 +115,8 @@
#define D6O_V6_PCP_SERVER 86 /* RFC7291 */
#define D6O_DHCPV4_MSG 87 /* RFC7341 */
#define D6O_DHCP4_O_DHCP6_SERVER 88 /* RFC7341 */
+/* not yet assigned but next free value */
+#define D6O_RELAY_SOURCE_PORT 135 /* I-D */
/*
* Status Codes, from RFC 3315 section 24.4, and RFC 3633, 5007, 5460.
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index 044aca93..90456b76 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -469,9 +469,12 @@ struct packet {
*/
isc_boolean_t unicast;
- /* Propogates server value SV_ECHO_CLIENT_ID so it is available
+ /* Propagates server value SV_ECHO_CLIENT_ID so it is available
* in cons_options() */
int sv_echo_client_id;
+
+ /* Relay port check */
+ isc_boolean_t relay_source_port;
};
/*
@@ -2440,6 +2443,8 @@ void eval_network_statements(struct option_state **options,
struct packet *packet,
struct group *network_group);
+u_int16_t dhcp_check_relayport(struct packet *packet);
+
/* dhcpleasequery.c */
void dhcpleasequery (struct packet *, int);
void dhcpv6_leasequery (struct data_string *, struct packet *);
@@ -2833,6 +2838,7 @@ extern int bind_local_address6;
extern u_int16_t local_port;
extern u_int16_t remote_port;
+extern u_int16_t relay_port;
extern int dhcpv4_over_dhcpv6;
extern int (*dhcp_interface_setup_hook) (struct interface_info *,
struct iaddr *);