Problem with default gateway

Vyacheslav V. Burdjanadze wr at zelax.ru
Fri Jul 19 18:34:56 UTC 2002


Ilya Alexeev suggest to patch rtrequest (for those interested) to solve 
problem. He tested it, I tested it too on two Motorola PPC 860 boards.

This is patched fragment of rtrequest function..

         case RTM_ADD: 

                 if ((flags & RTF_GATEWAY) && !gateway) 

                         panic("rtrequest: GATEWAY but no gateway"); 

 

                 if ((ifa = ifa_ifwithroute(flags, dst, gateway)) == 0) 
{
 

                         struct rtentry *rt1 = rtalloc1(gateway,0,0UL); 

                         if (rt1) { 

 

                             ifa = rt1->rt_ifa; 

                             RTFREE(rt1); 

                             if (!ifa) 

                                 senderr(ENETUNREACH); 

                         } 

                         else 

                             senderr(ENETUNREACH); 

                 } 

 

         makeroute:


Assume you have two boards connected directly by their interfaces with 
addresses 192.168.10.1/24 and 192.168.11.1/24. You should add route to 
remote network by issuing rtrequest, and then add gateway that resides 
in remote (non local) network as Ilya suggest in his posts above.

-- 

- " Why do you call this software 'beta' ? "
- " Cuz it beta than nothin' ! "







More information about the users mailing list