Author: jhb
Date: Mon Oct 19 18:24:06 2020
New Revision: 366845
URL: https://svnweb.freebsd.org/changeset/base/366845

Log:
  Check TF_TOE not the tod pointer to determine if TOE is active.
  
  The TF_TOE flag is the check used in the rest of the network stack to
  determine if TOE is active on a socket.  There is at least one path in
  the cxgbe(4) TOE driver that can leave the tod pointer non-NULL on a
  socket not using TOE.
  
  Reported by:  Sony Arpita Das <sonyarpi...@chelsio.com>
  Reviewed by:  np
  Sponsored by: Chelsio Communications
  Differential Revision:        https://reviews.freebsd.org/D26803

Modified:
  head/sys/kern/uipc_ktls.c

Modified: head/sys/kern/uipc_ktls.c
==============================================================================
--- head/sys/kern/uipc_ktls.c   Mon Oct 19 18:21:41 2020        (r366844)
+++ head/sys/kern/uipc_ktls.c   Mon Oct 19 18:24:06 2020        (r366845)
@@ -734,7 +734,7 @@ ktls_try_toe(struct socket *so, struct ktls_session *t
                return (ECONNRESET);
        }
        tp = intotcpcb(inp);
-       if (tp->tod == NULL) {
+       if (!(tp->t_flags & TF_TOE)) {
                INP_WUNLOCK(inp);
                return (EOPNOTSUPP);
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to