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
This commit is contained in:
parent
4092d532fe
commit
f22b416ddb
@ -438,6 +438,7 @@ sonewconn(struct socket *head, int connstatus)
|
|||||||
so->so_options = head->so_options &~ SO_ACCEPTCONN;
|
so->so_options = head->so_options &~ SO_ACCEPTCONN;
|
||||||
so->so_linger = head->so_linger;
|
so->so_linger = head->so_linger;
|
||||||
so->so_state = head->so_state | SS_NOFDREF;
|
so->so_state = head->so_state | SS_NOFDREF;
|
||||||
|
so->so_fibnum = head->so_fibnum;
|
||||||
so->so_proto = head->so_proto;
|
so->so_proto = head->so_proto;
|
||||||
so->so_cred = crhold(head->so_cred);
|
so->so_cred = crhold(head->so_cred);
|
||||||
#ifdef MAC
|
#ifdef MAC
|
||||||
|
@ -758,6 +758,7 @@ findpcb:
|
|||||||
}
|
}
|
||||||
inc.inc_fport = th->th_sport;
|
inc.inc_fport = th->th_sport;
|
||||||
inc.inc_lport = th->th_dport;
|
inc.inc_lport = th->th_dport;
|
||||||
|
inc.inc_fibnum = so->so_fibnum;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for an existing connection attempt in syncache if
|
* Check for an existing connection attempt in syncache if
|
||||||
|
@ -642,8 +642,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
inp = sotoinpcb(so);
|
inp = sotoinpcb(so);
|
||||||
inp->inp_inc.inc_fibnum = sc->sc_inc.inc_fibnum;
|
inp->inp_inc.inc_fibnum = so->so_fibnum;
|
||||||
so->so_fibnum = sc->sc_inc.inc_fibnum;
|
|
||||||
INP_WLOCK(inp);
|
INP_WLOCK(inp);
|
||||||
|
|
||||||
/* Insert new socket into PCB hash list. */
|
/* 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;
|
sc->sc_cred = cred;
|
||||||
cred = NULL;
|
cred = NULL;
|
||||||
sc->sc_ipopts = ipopts;
|
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));
|
bcopy(inc, &sc->sc_inc, sizeof(struct in_conninfo));
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
if (!(inc->inc_flags & INC_ISIPV6))
|
if (!(inc->inc_flags & INC_ISIPV6))
|
||||||
@ -1403,6 +1400,7 @@ syncache_respond(struct syncache *sc)
|
|||||||
} else
|
} else
|
||||||
optlen = 0;
|
optlen = 0;
|
||||||
|
|
||||||
|
M_SETFIB(m, sc->sc_inc.inc_fibnum);
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
if (sc->sc_inc.inc_flags & INC_ISIPV6) {
|
if (sc->sc_inc.inc_flags & INC_ISIPV6) {
|
||||||
th->th_sum = 0;
|
th->th_sum = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user