Date: Sat, 1 Aug 2009 07:09:51 +0000 (UTC) From: Julian Elischer <julian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r196010 - in stable/7/sys: . contrib/pf kern netinet Message-ID: <200908010709.n7179p7Y094603@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: julian Date: Sat Aug 1 07:09:50 2009 New Revision: 196010 URL: http://svn.freebsd.org/changeset/base/196010 Log: MFC #195922 Fix accept on sockets using multiple routing tables Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/uipc_socket.c stable/7/sys/netinet/tcp_input.c stable/7/sys/netinet/tcp_syncache.c Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Sat Aug 1 01:54:42 2009 (r196009) +++ stable/7/sys/kern/uipc_socket.c Sat Aug 1 07:09:50 2009 (r196010) @@ -431,6 +431,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: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Sat Aug 1 01:54:42 2009 (r196009) +++ stable/7/sys/netinet/tcp_input.c Sat Aug 1 07:09:50 2009 (r196010) @@ -577,6 +577,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: stable/7/sys/netinet/tcp_syncache.c ============================================================================== --- stable/7/sys/netinet/tcp_syncache.c Sat Aug 1 01:54:42 2009 (r196009) +++ stable/7/sys/netinet/tcp_syncache.c Sat Aug 1 07:09:50 2009 (r196010) @@ -678,8 +678,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. */ @@ -1173,8 +1172,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)) @@ -1438,6 +1435,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908010709.n7179p7Y094603>