aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dhcp/dhcp6_ia_na_client_dp.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-11-08 20:20:17 -0500
committerFlorin Coras <florin.coras@gmail.com>2019-11-09 17:28:14 +0000
commit20b962d3e494513ab28854936cc8bbc32891686b (patch)
tree46e5b006f7e5768dc0033a257a44529b00725a57 /src/plugins/dhcp/dhcp6_ia_na_client_dp.c
parent3c80c106a88f18523b7edaeaa8acf5728fd72ec3 (diff)
dhcp: fix dhcpv6 client and dhcpv6 prefix delegation
Keep trying even if the interface in question is not "admin-up, link-up." In real life, it's normal for link autonegotiation to take a good fraction of a second. The driver layer takes care of packets sent to an interface which can't transmit at the moment. Renew address leases at the preferred renewal time, not at the expiration time. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I68ec1c52cc1f4a8aa256185820748b845e92f7c1
Diffstat (limited to 'src/plugins/dhcp/dhcp6_ia_na_client_dp.c')
-rw-r--r--src/plugins/dhcp/dhcp6_ia_na_client_dp.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/plugins/dhcp/dhcp6_ia_na_client_dp.c b/src/plugins/dhcp/dhcp6_ia_na_client_dp.c
index 6ea822fff48..8ad7d765f69 100644
--- a/src/plugins/dhcp/dhcp6_ia_na_client_dp.c
+++ b/src/plugins/dhcp/dhcp6_ia_na_client_dp.c
@@ -84,8 +84,6 @@ create_buffer_for_client_message (vlib_main_t * vm, u32 sw_if_index,
u32 type)
{
dhcp6_client_common_main_t *ccm = &dhcp6_client_common_main;
- vnet_main_t *vnm = vnet_get_main ();
-
vlib_buffer_t *b;
u32 bi;
ip6_header_t *ip;
@@ -97,18 +95,6 @@ create_buffer_for_client_message (vlib_main_t * vm, u32 sw_if_index,
u32 n_addresses;
u32 i;
- vnet_hw_interface_t *hw = vnet_get_sup_hw_interface (vnm, sw_if_index);
- vnet_sw_interface_t *sup_sw = vnet_get_sup_sw_interface (vnm, sw_if_index);
- vnet_sw_interface_t *sw = vnet_get_sw_interface (vnm, sw_if_index);
-
- /* Interface(s) down? */
- if ((hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) == 0)
- return NULL;
- if ((sup_sw->flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) == 0)
- return NULL;
- if ((sw->flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) == 0)
- return NULL;
-
/* Get a link-local address */
src_addr = ip6_neighbor_get_link_local_address (sw_if_index);