- for (IHostFinder hf : hostFinder) {
- hf.find(decodeIPFromId(arphost.getHostId()));
- }
- arphost.sent_count++;
- logger.debug("ARP Sent from ARPPending List, IP: {}", decodeIPFromId(arphost.getHostId()));
- } else if (arphost.getSent_count() >= hostRetryCount) {
- /*
- * ARP requests have been sent without receiving a reply,
- * remove this from the pending list
- */
- ARPPendingList.remove(entry.getKey());
- logger.debug("ARP reply not received after multiple attempts, removing from Pending List IP: {}",
- decodeIPFromId(arphost.getHostId()));
- /*
- * Add this host to a different list which will be processed
- * on link up events
- */
- logger.debug("Adding the host to FailedARPReqList IP: {}", decodeIPFromId(arphost.getHostId()));
- failedARPReqList.put(entry.getKey(), arphost);
+ if (arphost.getSent_count() < hostRetryCount) {
+ /*
+ * No reply has been received of first ARP Req, send the
+ * next one. Before sending the ARP, check if ARPHandler
+ * is available or not
+ */
+ if (hostFinders.isEmpty()) {
+ logger.warn("ARPHandler Services are not available for Outstanding ARPs");
+ continue;
+ }
+ for (IHostFinder hf : hostFinders) {
+ hf.find(decodeIPFromId(arphost.getHostId()));
+ }
+ arphost.sent_count++;
+ logger.debug("ARP Sent from ARPPending List, IP: {}", decodeIPFromId(arphost.getHostId()));
+ } else if (arphost.getSent_count() >= hostRetryCount) {
+ /*
+ * ARP requests have been sent without receiving a
+ * reply, remove this from the pending list
+ */
+ ARPPendingList.remove(entry.getKey());
+ logger.debug(
+ "ARP reply not received after multiple attempts, removing from Pending List IP: {}",
+ decodeIPFromId(arphost.getHostId()));
+ /*
+ * Add this host to a different list which will be
+ * processed on link up events
+ */
+ logger.debug("Adding the host to FailedARPReqList IP: {}", decodeIPFromId(arphost.getHostId()));
+ failedARPReqList.put(entry.getKey(), arphost);