[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Source-Route on local ring



As Paul Norton said:
> 
>  > This happens for every single IP packet that I send through my default
>  > gateway. I've compiled in the source-route patch from P. Norton to look at
>  > my rif table through /proc/net/tr_rif, and indeed, my router is not in my
>  > RIF table. Am I right in thinking that it doesn't have to be, because my
>  > router is in my arp cache?
> 
> The RIF table is always updated, whether the frame is from an
> interface in the local ring or if it's from across one or more
> source-routing bridges. So your router should have an entry in the RIF
> table (provided it hasn't already expired) and it should show up as a
> local route, i.e. no RIF necessary since it's on the local ring. 

Thanks for the explanation of how tr_add_rif_info works. The oltr driver
uses a function called tr_type_trans2(), which is similar to
tr_type_trans(). They needed another function because they handle the SNAP
trllc differently than ibmtr. In oltr's tr_type_trans2(), I saw these
lines:

  if(trh->saddr[0] & TR_RII)
    tr_add_rif_info(trh, dev);
 
because one would logically thing that you only need to add rif into to the
table if the packet is source-routed. Armed with your explanation, I boldly
remarked out the conditional so that tr_type_trans2() always calls
tr_add_rif_info(), just as tr_type_trans() does. That fixed my problem. My
router is now in my RIF table:

eth0 6C:00:19:C9:0E:8D 59993 local

BTW, I have my Linux box on a large network, with a lot of source-routed
SNA. I had to increase the RIF_TABLE_SIZE in net/802/tr.c. I doubled it to
64. This is even with my patch to only call tr_add_rif_info for packets
that are not PACKET_OTHERHOST.

`wc -l /proc/net/tr_rif`
     39 /proc/net/tr_rif

thanks for the information!

--gilbert
-- 
Gilbert Ramirez                Voice:  +1 210 358 4032
Technical Services             Fax:    +1 210 358 1122
University Health System       San Antonio, Texas, USA