The ARP cache table wasn't being flushed correctly due to a bug in the time stamp comparison. The same bug can also be observed to find the oldest entry in the ARP cache table to override.
Signed-off-by: Eddie Wai <eddie....@broadcom.com> --- iscsiuio/src/uip/uip_arp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iscsiuio/src/uip/uip_arp.c b/iscsiuio/src/uip/uip_arp.c index f7a9594..a8de07f 100644 --- a/iscsiuio/src/uip/uip_arp.c +++ b/iscsiuio/src/uip/uip_arp.c @@ -112,7 +112,7 @@ void uip_arp_timer(void) for (i = 0; i < UIP_ARPTAB_SIZE; ++i) { tabptr = &arp_table[i]; if ((tabptr->ipaddr[0] | tabptr->ipaddr[1]) != 0 && - arptime - tabptr->time >= UIP_ARP_MAXAGE) + (u8_t)(arptime - tabptr->time) >= UIP_ARP_MAXAGE) memset(tabptr->ipaddr, 0, 4); } @@ -165,8 +165,8 @@ static void uip_arp_update(u16_t *ipaddr, struct uip_eth_addr *ethaddr) c = 0; for (i = 0; i < UIP_ARPTAB_SIZE; ++i) { tabptr = &arp_table[i]; - if (arptime - tabptr->time > tmpage) { - tmpage = arptime - tabptr->time; + if ((u8_t)(arptime - tabptr->time) > tmpage) { + tmpage = (u8_t)(arptime - tabptr->time); c = i; } } -- 1.7.1 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegroups.com. To post to this group, send email to open-iscsi@googlegroups.com. Visit this group at http://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/groups/opt_out.