mirror of
https://github.com/opnsense/src.git
synced 2026-04-26 08:37:50 -04:00
Heed SO_NO_OFFLOAD.
MFC after: 1 week
This commit is contained in:
parent
5cd3dcaa25
commit
37cc0ecb1b
1 changed files with 5 additions and 2 deletions
|
|
@ -370,7 +370,8 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td)
|
|||
tp->t_state = TCPS_LISTEN;
|
||||
solisten_proto(so, backlog);
|
||||
#ifdef TCP_OFFLOAD
|
||||
tcp_offload_listen_start(tp);
|
||||
if ((so->so_options & SO_NO_OFFLOAD) == 0)
|
||||
tcp_offload_listen_start(tp);
|
||||
#endif
|
||||
}
|
||||
SOCK_UNLOCK(so);
|
||||
|
|
@ -414,7 +415,8 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td)
|
|||
tp->t_state = TCPS_LISTEN;
|
||||
solisten_proto(so, backlog);
|
||||
#ifdef TCP_OFFLOAD
|
||||
tcp_offload_listen_start(tp);
|
||||
if ((so->so_options & SO_NO_OFFLOAD) == 0)
|
||||
tcp_offload_listen_start(tp);
|
||||
#endif
|
||||
}
|
||||
SOCK_UNLOCK(so);
|
||||
|
|
@ -468,6 +470,7 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
|
|||
goto out;
|
||||
#ifdef TCP_OFFLOAD
|
||||
if (registered_toedevs > 0 &&
|
||||
(so->so_options & SO_NO_OFFLOAD) == 0 &&
|
||||
(error = tcp_offload_connect(so, nam)) == 0)
|
||||
goto out;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue