diff options
author | Nilesh Javali <nilesh.javali@cavium.com> | 2018-08-24 06:38:45 -0400 |
---|---|---|
committer | Nilesh Javali <nilesh.javali@cavium.com> | 2018-08-24 06:38:45 -0400 |
commit | 65bcce29d5d7ad3831513fe14c76791287847597 (patch) | |
tree | e99aefb76eb48ad89b4359322efe81d8dc420ba5 /iscsiuio | |
parent | cda251fc8bcf57454a2573d5cd097666a88efe72 (diff) | |
download | open-iscsi-65bcce29d5d7ad3831513fe14c76791287847597.tar.gz |
iscsiuio: limit retries of performing dhcpv6 before declaring dhcp failure
After successful stateless router adv., the restart of handle_ndp thread
infinitely checks dhcpv6 causing IPv6 DHCP sequence failure.
Limit the retries of dhcpv6 validation.
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Diffstat (limited to 'iscsiuio')
-rw-r--r-- | iscsiuio/src/uip/ipv6_ndpc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/iscsiuio/src/uip/ipv6_ndpc.c b/iscsiuio/src/uip/ipv6_ndpc.c index a396cb7..bb07c1d 100644 --- a/iscsiuio/src/uip/ipv6_ndpc.c +++ b/iscsiuio/src/uip/ipv6_ndpc.c @@ -134,6 +134,7 @@ wait_rtr: } while (!(ipv6c->flags & IPV6_FLAGS_ROUTER_ADV_RECEIVED)); LOG_DEBUG("%s: ndpc_handle got rtr adv", s->nic->log_name); + s->retry_count = 0; no_rtr_adv: s->state = NDPC_STATE_RTR_ADV; @@ -200,9 +201,13 @@ wait_dhcp: } else { /* Static IPv6 */ if (ustack->ip_config == IPV6_CONFIG_DHCP) { - LOG_DEBUG("%s: ndpc_handle DHCP failed", - s->nic->log_name); - PT_RESTART(&s->pt); + s->retry_count++; + if (s->retry_count > DHCPV6_NUM_OF_RETRY) { + LOG_DEBUG("%s: ndpc_handle DHCP failed", + s->nic->log_name); + } else { + PT_RESTART(&s->pt); + } } staticv6: ipv6_disable_dhcpv6(ipv6c); |