[Pkg-iscsi-maintainers] [open-iscsi] 26/48: ISCSIUIO: Added fix for the ARP cache flush mechanism

Ritesh Raj Sarraf rrs at moszumanska.debian.org
Wed Aug 20 13:54:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

rrs pushed a commit to branch upstream-mnc
in repository open-iscsi.

commit 817a0831c54f06dda2727fe1118e7a65181eb128
Author: Eddie Wai <eddie.wai at broadcom.com>
Date:   Wed Dec 11 15:38:14 2013 -0800

    ISCSIUIO: Added fix for the ARP cache flush mechanism
    
    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.wai at broadcom.com>
---
 iscsiuio/src/uip/uip_arp.c | 6 +++---
 1 file 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;
 			}
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-iscsi/open-iscsi.git



More information about the Pkg-iscsi-maintainers mailing list