Date: Sun, 13 Feb 2011 14:41:40 +0530 From: Naveen Gujje <gujjenaveen@gmail.com> To: Julian Elischer <julian@freebsd.org> Cc: Daniel Eischen <deischen@freebsd.org>, freebsd-hackers@freebsd.org Subject: Re: SO_SETFIB socket option Message-ID: <AANLkTik7SD_Z%2BoPd0_brvg54FTig1KSSwk-g5buNXsb2@mail.gmail.com> In-Reply-To: <4D56F278.1060801@freebsd.org> References: <AANLkTimDu20-Q6n0sCgafGQb1G6Pj8bOVDtvcU%2B4UUKM@mail.gmail.com> <Pine.GSO.4.64.1102121136410.29788@sea.ntplx.net> <4D56F278.1060801@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 13, 2011 at 2:20 AM, Julian Elischer <julian@freebsd.org> wrote: > 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. > > > Thanks for the confirmation Daniel and Julian. Tried with patched kernel and it fixes the problem. Thanks, Naveen G.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik7SD_Z%2BoPd0_brvg54FTig1KSSwk-g5buNXsb2>