From owner-svn-src-head@FreeBSD.ORG Tue Jul 28 19:43:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22BE6106566B; Tue, 28 Jul 2009 19:43:28 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAB388FC18; Tue, 28 Jul 2009 19:43:27 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6SJhRW2041617; Tue, 28 Jul 2009 19:43:27 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6SJhRqv041613; Tue, 28 Jul 2009 19:43:27 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200907281943.n6SJhRqv041613@svn.freebsd.org> From: Julian Elischer Date: Tue, 28 Jul 2009 19:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195922 - in head/sys: kern netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 19:43:28 -0000 Author: julian Date: Tue Jul 28 19:43:27 2009 New Revision: 195922 URL: http://svn.freebsd.org/changeset/base/195922 Log: Somewhere along the line accept sockets stopped honoring the FIB selected for them. Fix this. Reviewed by: ambrisko Approved by: re (kib) MFC after: 3 days Modified: head/sys/kern/uipc_socket.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_syncache.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Jul 28 17:16:54 2009 (r195921) +++ head/sys/kern/uipc_socket.c Tue Jul 28 19:43:27 2009 (r195922) @@ -438,6 +438,7 @@ sonewconn(struct socket *head, int conns so->so_options = head->so_options &~ SO_ACCEPTCONN; so->so_linger = head->so_linger; so->so_state = head->so_state | SS_NOFDREF; + so->so_fibnum = head->so_fibnum; so->so_proto = head->so_proto; so->so_cred = crhold(head->so_cred); #ifdef MAC Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Jul 28 17:16:54 2009 (r195921) +++ head/sys/netinet/tcp_input.c Tue Jul 28 19:43:27 2009 (r195922) @@ -758,6 +758,7 @@ findpcb: } inc.inc_fport = th->th_sport; inc.inc_lport = th->th_dport; + inc.inc_fibnum = so->so_fibnum; /* * Check for an existing connection attempt in syncache if Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Tue Jul 28 17:16:54 2009 (r195921) +++ head/sys/netinet/tcp_syncache.c Tue Jul 28 19:43:27 2009 (r195922) @@ -642,8 +642,7 @@ syncache_socket(struct syncache *sc, str #endif inp = sotoinpcb(so); - inp->inp_inc.inc_fibnum = sc->sc_inc.inc_fibnum; - so->so_fibnum = sc->sc_inc.inc_fibnum; + inp->inp_inc.inc_fibnum = so->so_fibnum; INP_WLOCK(inp); /* Insert new socket into PCB hash list. */ @@ -1128,8 +1127,6 @@ _syncache_add(struct in_conninfo *inc, s sc->sc_cred = cred; cred = NULL; sc->sc_ipopts = ipopts; - /* XXX-BZ this fib assignment is just useless. */ - sc->sc_inc.inc_fibnum = inp->inp_inc.inc_fibnum; bcopy(inc, &sc->sc_inc, sizeof(struct in_conninfo)); #ifdef INET6 if (!(inc->inc_flags & INC_ISIPV6)) @@ -1403,6 +1400,7 @@ syncache_respond(struct syncache *sc) } else optlen = 0; + M_SETFIB(m, sc->sc_inc.inc_fibnum); #ifdef INET6 if (sc->sc_inc.inc_flags & INC_ISIPV6) { th->th_sum = 0;