This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMS320DM8147: NDK Stack replies incorrectly on ping requests (reason detected in function LLIValidateRoute of lliin.c)

Part Number: TMS320DM8147

Tool/software: TI-RTOS

PC net configuration: IP=192.168.1.10, Mask=255.255.0.0, DaVinci Device IP=192.168.0.250, Mask=255.255.255.0

The NDK stack of the device replies to Ping from PC, although the PC is not in the same subnet of the device.

Here's the original code of our version ndk_2_25_00_09. If I remove the call to RtCreate, everything works fine. It looks like that RtCreate function-call allows every route to any packet which is received. Am I right?

/*-------------------------------------------------------------------- */
/* LLIValidateRoute - Create/correct a route with an LLI entry as */
/*                    specified by the IF and IP/MAC address pair */
/* Returns a referenced route handle */
/*-------------------------------------------------------------------- */
HANDLE LLIValidateRoute( HANDLE hIF, IPN IPAddr, UINT8 *pMacAddr )
{
    HANDLE  hRt;

    /* If an entry is found, update it */ 
    hRt = updateRtTable(hIF, IPAddr, pMacAddr);

    if (hRt == NULL) {
        /* We don't have a match - create one */

        /* Create the route */
        hRt = RtCreate( FLG_RTF_REPORT, FLG_RTE_HOST|FLG_RTE_KEEPALIVE,
                        IPAddr, 0xffffffff, hIF, 0, pMacAddr );
    }

        /* Set the route timeout */
    /* Bug fix: Update the route too when LLI is refreshed. */
        if( hRt )
            RtSetTimeout( hRt, (UINT32)LLI_KEEPALIVE_TIMEOUT );

    /* Return the referenced route */
    return( hRt );
}