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 堆栈在 ping 请求时错误地应答(在 lliin.c 的函数 LLIValidateRoute 中检测到原因)

Guru**** 2540720 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/601700/rtos-tms320dm8147-ndk-stack-replies-incorrectly-on-ping-requests-reason-detected-in-function-llivalidateroute-of-lliin-c

器件型号:TMS320DM8147

工具/软件:TI-RTOS

PC 网络配置: IP =192.168.1.10、掩码=255.255.0.0、 达芬奇器件 IP =192.168.0.250、掩码=255.255.255.0

虽然 PC 不在器件的同一子网中、但器件的 NDK 堆栈会从 PC 回复 Ping。

这是我们的 NDK_2_25_00_09版本的原始代码。 如果我删除对 RtCreate 的调用、一切都正常。 看起来、RtCreate 函数调用允许每个路由到任何接收到的数据包。 我是对的吗?

/*------------------ */
/* LLIValidateRoute -创建/更正 LLI 条目为*/
/*的路由 由 IF 和 IP/MAC 地址对指定的*/
/*返回引用的路由句柄*/
/*--------------------------------------------------------------- //
handle LCLIValidateRoute( handle HIF、IPN ipaddr、uint8 *pMacAddr )
{
手柄 HRT;

/*如果找到条目,则更新它*/
HRT = updateRtTable (HIF、ipaddr、pMacAddr);

if (HRT == NULL){
/*我们没有匹配项-创建一个*/

/*创建路由*/
HRT = rtCreate (Flg_rtf_report、Flg_rte_host|Flg_rte_keepalive、
ipaddr、0xffffffff、HIF、0、pMacAddr );
}

/*设置路由超时*/
/*错误修复:刷新 LLI 时也更新路由。 *
if (HRT)
rtSetTimeout( HRT,(UINT32) LLI_keepalive_timeout );

/*返回引用的路由*/
return( HRT );
}