summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2009-07-28 19:43:27 +0000
committerjulian <julian@FreeBSD.org>2009-07-28 19:43:27 +0000
commitf22b416ddb62260d0b81c89a5d5d330c90b92170 (patch)
treed4546cf01d9d119487b9932d022b22472cce4200 /sys/netinet/tcp_syncache.c
parent4092d532fe6dc0bf94bf61afe6e251b06754f6d0 (diff)
downloadFreeBSD-src-f22b416ddb62260d0b81c89a5d5d330c90b92170.zip
FreeBSD-src-f22b416ddb62260d0b81c89a5d5d330c90b92170.tar.gz
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
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 65c1d51..23e2570 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -642,8 +642,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
#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, struct tcpopt *to, struct tcphdr *th,
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;
OpenPOWER on IntegriCloud