AnsweredAssumed Answered

Routing problem over two different subnet

Question asked by Gian Michele Pasinelli on Apr 26, 2016
Latest reply on May 2, 2016 by soledad

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

Outcomes