diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2025-02-06 14:14:49 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2025-02-06 14:14:49 +0000 |
| commit | 5dc99e9bb985dce58e8fc85c09ef4e49bf051971 (patch) | |
| tree | b0eb98b75ea5d974d26660d995e76048519dc74a /sys/netinet/tcp_usrreq.c | |
| parent | da806e8db685eead02bc67888b16ebac6badb6b6 (diff) | |
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
| -rw-r--r-- | sys/netinet/tcp_usrreq.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 776ebe5db83b..0b4a93390f1b 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -262,7 +262,8 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) goto out; } INP_HASH_WLOCK(&V_tcbinfo); - error = in_pcbbind(inp, sinp, 0, td->td_ucred); + error = in_pcbbind(inp, sinp, V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, + td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); out: tcp_bblog_pru(tp, PRU_BIND, error); @@ -336,7 +337,8 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) } } #endif - error = in6_pcbbind(inp, sin6, 0, td->td_ucred); + error = in6_pcbbind(inp, sin6, V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, + td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); out: if (error != 0) @@ -378,7 +380,8 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td) } if (inp->inp_lport == 0) { INP_HASH_WLOCK(&V_tcbinfo); - error = in_pcbbind(inp, NULL, 0, td->td_ucred); + error = in_pcbbind(inp, NULL, + V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); } if (error == 0) { @@ -441,7 +444,8 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td) inp->inp_vflag &= ~INP_IPV4; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) inp->inp_vflag |= INP_IPV4; - error = in6_pcbbind(inp, NULL, 0, td->td_ucred); + error = in6_pcbbind(inp, NULL, + V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); } INP_HASH_WUNLOCK(&V_tcbinfo); if (error == 0) { |
