anchor.diff:                              trace({ktls_error, KtlsReason})
                       end;
                   false ->
  -                    accept_one(Driver, Kernel, SslSocket, KTLS, Sender)
  +                    accept_one(
  +                      Driver, Kernel, Sender,
  +                      fun ssl:controlling_process/2, SslSocket)
               end;
           {error, {options, _}} = Error ->
               %% Bad options: that's probably our fault.
  
positive.code:                             {error, KtlsReason} ->
                                  ?shutdown2(
                                     Node,
                                     trace({set_ktls_falied, KtlsReason}))
                          end;
                      false ->
                          _ = monitor_pid(Sender),
  
negative.code: 	    error(malformed_ssl_dist_opt, [Value])
      end.
  
  set_ktls(KtlsInfo) ->
      %%
      %% Check OS type and version
      %%
      case {os:type(), os:version()} of
          {{unix,linux}, {Major,Minor,_}}
            when 5 == Major, 2 =< Minor;
                 5 < Major ->
              set_ktls_1(KtlsInfo);
          OsTypeVersion ->
              {error, {ktls_invalid_os, OsTypeVersion}}
      end.
  
  %% Check TLS version and cipher suite
  %%
  set_ktls_1(
    #{tls_version := {3,4}, % 'tlsv1.3'
      cipher_suite := CipherSuite,
      socket := Socket} = KtlsInfo)
    when CipherSuite =:= ?TLS_AES_256_GCM_SHA384 ->
      %%
      %% See https://www.kernel.org/doc/html/latest/networking/tls.html
      %% and include/netinet/tcp.h
      %%
      SOL_TCP = 6,
      TCP_ULP = 31,
      _ = inet:setopts(Socket, [{raw, SOL_TCP, TCP_ULP, <<"tls">>}]),
      %%
      %% Check if kernel module loaded,
      %% i.e if getopts SOL_TCP,TCP_ULP returns "tls"
      %%
      case inet:getopts(Socket, [{raw, SOL_TCP, TCP_ULP, 4}]) of
          {ok, [{raw, SOL_TCP, TCP_ULP, <<"tls",0>>}]} ->
              set_ktls_2(KtlsInfo, Socket);
          Other ->
              {error, {ktls_not_supported, Other}}
      end;
  set_ktls_1(
    #{tls_version := TLSVersion,
      cipher_suite := CipherSuite,
      socket := _}) ->
      {error, {ktls_invalid_cipher, TLSVersion, CipherSuite}}.
  
  %% Set kTLS cipher
  %%
  set_ktls_2(
    #{write_state :=
          #cipher_state{
             key = <<WriteKey:32/bytes>>,
             iv = <<WriteSalt:4/bytes, WriteIV:8/bytes>>
            },
      write_seq := WriteSeq,
      read_state :=
          #cipher_state{
             key = <<ReadKey:32/bytes>>,
             iv = <<ReadSalt:4/bytes, ReadIV:8/bytes>>
            },
      read_seq := ReadSeq,
      socket_options := SocketOptions},
    Socket) ->
      %%
      %% See include/linux/tls.h
      %%
  