Routing problem over two different subnet

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Routing problem over two different subnet

643 Views
gianmichelepasi
Contributor II

Hi,

I'm sorry, I've already opened a post at links

https://community.freescale.com/thread/385983

https://community.freescale.com/thread/385788

but I open new discussion because I can't add new answers, I can only create new post.

I'm trying to solve my problem where the ping anomaly is only the most evident and the most simple problem.

I found that in ICMP_service routine, in icmp.c file, at ICMPTYPE_REDIRECT switch case, condition IP_is_gate(source, origdest) returns 1 when the server (192.168.76.1) sends ICMP packet with message redirect.

ICMP redirect message says at RTCS that it can send our message directly to my PC (192.168.67.87), but my PC is in different subnet, and I think this event causes problems at routing table of RTCS stack.

I use MQX 4.0 on K60, but it seems to me that MQX 4.2 doesn't fix this problem.

This is the extract of the code:

     } else  if(IP_is_gate(source, origdest)) {

        parms.address = gateway;

        parms.network = origdest;

        parms.netmask = 0xFFFFFFFFL;

        parms.locmask = 0;

        RTCSCMD_internal(parms, IPIF_gate_add_redirect);

     } else {

I found if I add this condition:

         } else  if(origdest!=0xC0A84357 && IP_is_gate(source, origdest)) {

the ping and my other functions always run properly.

I think the RTCS should discard destinations if they're different from our subnet.

Can you help me to add a correct fix for my problem?

Do you agree with what I'm saying?

Thanks in advance for your help,

bye,

Michele

Labels (1)
Tags (3)
0 Kudos
1 Reply

328 Views
soledad
NXP Employee
NXP Employee

Hello Michele,

Please check the below thread, I hope this helps

how to set/change gateway setting or make it accept connection from different subnet


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos