Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Feb 2011 12:50:00 -0800
From:      Julian Elischer <julian@freebsd.org>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Naveen Gujje <gujjenaveen@gmail.com>
Subject:   Re: SO_SETFIB socket option
Message-ID:  <4D56F278.1060801@freebsd.org>
In-Reply-To: <Pine.GSO.4.64.1102121136410.29788@sea.ntplx.net>
References:  <AANLkTimDu20-Q6n0sCgafGQb1G6Pj8bOVDtvcU%2B4UUKM@mail.gmail.com> <Pine.GSO.4.64.1102121136410.29788@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/12/11 8:40 AM, Daniel Eischen wrote:
> On Sat, 12 Feb 2011, Naveen Gujje wrote:
>
>> Hi All,
>>
>> On my FreeBSD 7.2 box, I've two routing tables (FIBs). Fib 0 and Fib 1
>> (net.fibs = 2).
>>
>> I have a simple echo client which is the counterpart of an echo server
>> running somewhere.
>> If I run this echo client against fib 0 as 'setfib 0 
>> ./echo-client', it
>> properly uses Fib 0.
>> But, if I run this echo client against Fib 0 by using setsockopt & 
>> SO_SETFIB
>> option, setsockopt fails with EINVAL.
>>
>> setsockopt & SO_SETFIB for Fib 1 succeeds. But it fails for Fib 0.
>>
>> By looking at the man page and /sys/kern/uipc_socket.c
>
> [ snip ]
>
>> Where as both Fib 0 and Fib 1 work fine if I use setfib() call.
>
> Looks like the code is wrong.  Have you tried patching the source
> to see if it works for you?  Looks like you already know the fix,
> but here is a patch if you'd like to rebuild your kernel to see
> if it works.
>

yeah looks like a braino on my part..  I probably only tested by going 
UP from fib0 to fib 1 and not
teh other way around.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D56F278.1060801>