- Fix a small bug in the route selection code
authorCameron Gutman <aicommander@gmail.com>
Sat, 19 Sep 2009 03:22:26 +0000 (03:22 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sat, 19 Sep 2009 03:22:26 +0000 (03:22 +0000)
svn path=/trunk/; revision=43078

reactos/lib/drivers/ip/network/router.c

index a44d9e3..a220db8 100644 (file)
@@ -274,8 +274,8 @@ PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination)
        TI_DbgPrint(DEBUG_ROUTER,("This-Route: %s (Sharing %d bits)\n",
                                  A2S(&NCE->Address), Length));
 
-       if(Length >= MaskLength && (Length > BestLength || !BestLength) &&
-           (!(State & NUD_STALE) || !BestState)) {
+       if(Length >= MaskLength && (Length > BestLength || !BestNCE) &&
+           (!(State & NUD_STALE) || !BestNCE)) {
            /* This seems to be a better router */
            BestNCE    = NCE;
            BestLength = Length;