[Xorp-users] Question on supporting multiple routing tables [PATCH]
Ben Greear
greearb at candelatech.com
Fri Sep 7 11:14:37 PDT 2007
Pavlin Radoslavov wrote:
> Ben Greear <greearb at candelatech.com> wrote:
>
>> Ben Greear wrote:
>>> I attempted to change my patch per your (off-list) comments,
>>> basically to only bind when non-multicast and then immediately
>>> un-bind. Unfortunately, it appears that the Linux kernel logic
>>> to un-bind does not work. I sent a mail to the kernel mailing
>>> list, so hopefully it can be fixed sometime soon (or I can be
>>> properly beat around the head if it's my mistake.)
>> Well, at least part of the problem was self inflicted, as usual.
>> I'm still not certain the kernel handles un-binds correctly, but
>> as far as I can tell, that doesn't matter for Xorp since we always
>> bind on uni-cast, and multi-cast doesn't care.
>>
>> I have tested the attached patch, and it seems to work as planned.
>>
>> Please review and apply if it meets your specifications. There is
>> a small change to the original logic: It used to return on some
>> error cases and not run the loopback multicast setup at the bottom
>> of the method. With the new patch, it will always run the loopback multicast
>> test, as well as the un-bindtodevice logic.
>>
>> If you want changes to the patch, let me know.
>
> Ben,
>
> Thank you for the patch.
> I applied it with some additional modifications. Most notably,
> the setsockopt(SO_BINDTODEVICE) mechanism is used only when it is
> needed currently (i.e., only if the unicast forwarding table ID is
> configured).
I just tested this and it seems to work fine.
Would it be possible/useful to use two Xorps with the default routing table
as long as they are configured for different sets of interfaces? I
wouldn't use it like that, so if you can't think of a reason, then
we should leave the check for table-id in as you have it...
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-users
mailing list