浏览代码

[tls] Ensure that window change is propagated to plainstream interface

The cipherstream xfer_window_changed() message is used to retrigger
the TLS transmit state machine.  If the transmit state machine is
idle, then the window change message will not be propagated to the
plainstream interface.  This can potentially cause the plainstream
interface peer (e.g. httpcore) to block waiting for a window change
message that will never arrive.

Fix by ensuring that the window change message is propagated to the
plainstream interface if the transmit state machine is idle.  (If the
transmit state machine is not idle then the plainstream window will be
zero anyway.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年前
父节点
当前提交
baaf50017d
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      src/net/tls.c

+ 7
- 2
src/net/tls.c 查看文件

2747
 		tls->tx_pending &= ~TLS_TX_FINISHED;
2747
 		tls->tx_pending &= ~TLS_TX_FINISHED;
2748
 	}
2748
 	}
2749
 
2749
 
2750
-	/* Reschedule process if pending transmissions remain */
2751
-	if ( tls->tx_pending )
2750
+	/* Reschedule process if pending transmissions remain,
2751
+	 * otherwise send notification of a window change.
2752
+	 */
2753
+	if ( tls->tx_pending ) {
2752
 		tls_tx_resume ( tls );
2754
 		tls_tx_resume ( tls );
2755
+	} else {
2756
+		xfer_window_changed ( &tls->plainstream );
2757
+	}
2753
 
2758
 
2754
 	return;
2759
 	return;
2755
 
2760
 

正在加载...
取消
保存