summaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/client.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-01-17 10:29:10 -0800
committerOle Trøan <otroan@employees.org>2018-01-23 13:36:48 +0000
commit54c6dc450031443663d40b836a8b0bffdcc2bdea (patch)
tree0d59479cda2cdaf14ecd72a6d72ef2ac3083e6ac /src/vnet/dhcp/client.h
parent9d42087149a6870965896be74dc6260f72d2cac9 (diff)
For DHCP client configuration control the setting of the broadcast flag in the
DISCOVER message sent. According to RFC2131: In the case of a client using DHCP for initial configuration (before the client's TCP/IP software has been completely configured), DHCP requires creative use of the client's TCP/IP software and liberal interpretation of RFC 1122. The TCP/IP software SHOULD accept and forward to the IP layer any IP packets delivered to the client's hardware address before the IP address is configured; DHCP servers and BOOTP relay agents may not be able to deliver DHCP messages to clients that cannot accept hardware unicast datagrams before the TCP/IP software is configured. To work around some clients that cannot accept IP unicast datagrams before the TCP/IP software is configured as discussed in the previous paragraph, DHCP uses the 'flags' field [21]. The leftmost bit is defined as the BROADCAST (B) flag. The semantics of this flag are discussed in section 4.1 of this document. The remaining bits of the flags field are reserved for future use. They MUST be set to zero by clients and ignored by servers and relay agents. Figure 2 gives the format of the 'flags' field. this changes means VPP conforms to the: "SHOULD accept and forward to the IP layer any IP packets delivered to the client's hardware address before the IP address is configured" with the caveat that VPP allows DHCP packets destined to the stanard client DHCP port to be delivered. With this enhancement the control-plane is now able to choose the setting of the broadcast flag. Change-Id: Ia4eb2c9bb1e30c29f9192facc645e9533641955a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/dhcp/client.h')
-rw-r--r--src/vnet/dhcp/client.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/dhcp/client.h b/src/vnet/dhcp/client.h
index d9c7e25d0b2..1c2becb3058 100644
--- a/src/vnet/dhcp/client.h
+++ b/src/vnet/dhcp/client.h
@@ -71,6 +71,10 @@ typedef struct
/* Information used for event callback */
u32 client_index;
u32 pid;
+
+ /* Set the broadcast Flag in the Discover/Request messages */
+ u8 set_broadcast_flag;
+
void *event_callback;
} dhcp_client_t;
@@ -90,6 +94,7 @@ typedef struct
{
int is_add;
u32 sw_if_index;
+ u8 set_broadcast_flag;
/* vectors, consumed by dhcp client code */
u8 *hostname;
@@ -118,7 +123,8 @@ int dhcp_client_config (vlib_main_t * vm,
u8 * hostname,
u8 * client_id,
u32 is_add,
- u32 client_index, void *event_callback, u32 pid);
+ u32 client_index,
+ void *event_callback, u8 set_broadcast_flag, u32 pid);
#endif /* included_dhcp_client_h */