From owner-freebsd-net@FreeBSD.ORG Mon Jul 27 20:34:21 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3679D10656BF for ; Mon, 27 Jul 2009 20:34:21 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outR.internet-mail-service.net (outr.internet-mail-service.net [216.240.47.241]) by mx1.freebsd.org (Postfix) with ESMTP id 1C70D8FC24 for ; Mon, 27 Jul 2009 20:34:21 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id D7C782324; Mon, 27 Jul 2009 13:34:20 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 7EFC82D6012; Mon, 27 Jul 2009 13:34:20 -0700 (PDT) Message-ID: <4A6E0F50.1010504@elischer.org> Date: Mon, 27 Jul 2009 13:34:24 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Oleg Sharoyko References: <1248704237.96833.127.camel@brain.cc.rsu.ru> <4A6DE356.6040006@elischer.org> <4A6DEE30.6000108@sfedu.ru> <4A6DFFA1.1010709@elischer.org> <4A6E0121.2020004@sfedu.ru> <4A6E05EC.8050401@elischer.org> <4A6E0A8B.5000103@sfedu.ru> In-Reply-To: <4A6E0A8B.5000103@sfedu.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Wrong outgoing interface with multiple routing tables X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 20:34:21 -0000 Oleg Sharoyko wrote: > > Julian Elischer wrote: > >> great.. in your simple server, can you do the sockopt on the socket >> AFTER you did the listen()? >> (just as a test). > > Doesn't help. I have also tried to add setsockopt() after accept() (for > a new socket) and in this case the only packet that is being sent out > via wrong interface is the SYN+ACK from server. this is very important. it means I'm not setting the fibnum in the syncache code correctly. > > I'll try to look into the kernel code tomorrow and will report any > findings. > > -- > Oleg