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.


_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to