anchor.diff:                                          nil)
                         (if (logtest flags +tcp4-flag-ack+)
                             ;; Remote saw our FIN and closed as well.
  -                          (progn
  -                            (setf (tcp-connection-state connection) :closed)
  -                            (detach-tcp-connection connection))
  +                          (detach-tcp-connection connection)
                             ;; Simultaneous close
                             (setf (tcp-connection-state connection) :closing)))
                        ((logtest flags +tcp4-flag-ack+)
  
positive.code:            (header-length (* (ldb (byte 4 12) flags-and-data-offset) 4))
             (data-length (- end (+ start header-length))))
        (when (logtest flags +tcp4-flag-rst+)
          ;; Remote have sended RST , aborting connection
          (setf (tcp-connection-state connection) :closed)
          (setf (tcp-connection-pending-error connection)
                (make-condition 'connection-aborted
                                :host (tcp-connection-remote-ip connection)
                                :port (tcp-connection-remote-port connection)))
          (detach-tcp-connection connection))
        (case (tcp-connection-state connection)
          (:syn-sent
           ;; Active open
           (cond ((and (logtest flags +tcp4-flag-ack+)
                       (logtest flags +tcp4-flag-syn+)
                       (eql ack (tcp-connection-s-next connection)))
                  ;; Remote have sended SYN+ACK and waiting for ACK
                  (setf (tcp-connection-state connection) :established
                        (tcp-connection-r-next connection) (logand (1+ seq) #xFFFFFFFF))
                  (tcp4-send-packet connection ack (tcp-connection-r-next connection) nil)
                  ;; Cancel retransmit. FIXME: This ACK might need to be retransmitted.
                  (disarm-retransmit-timer connection)
                  (disarm-timeout-timer connection))
                 ((logtest flags +tcp4-flag-syn+)
  
negative.code:           (make-condition 'connection-timed-out
                            :host (tcp-connection-remote-ip connection)
                            :port (tcp-connection-remote-port connection)))
      (mezzano.supervisor:condition-notify (tcp-connection-cvar connection) t)
      (detach-tcp-connection connection)))
  
  