From da9d9387f6c21dc018c70517545237cee5061b5b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 7 Dec 2020 15:53:57 +0100 Subject: [PATCH] NS_Emulation: Tolerate late NS-BLOCK-ACK / NS-UNBLOCK-ACK Particularly in case both sides initiate a BLOCK or UNBLOCK procedure at almost the same time, it can happen thet we're already in BLOCKED state and receive a late BLOCK-ACK or in UNBLOCKED state and receive a late UNBLOCK-ACK. Let's just silently discard them instaed of generating NS-STATUS which may confuse the peer. Change-Id: I2e5b934e1cf6c6cf982d5ab1dbb32e8920b91071 --- library/NS_Emulation.ttcnpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp index ab1c13676..2ccd39995 100644 --- a/library/NS_Emulation.ttcnpp +++ b/library/NS_Emulation.ttcnpp @@ -561,6 +561,9 @@ module NS_Emulation { Tns_block.stop; f_change_state(NSVC_S_ALIVE_UNBLOCKED); } + /* tolerate a late NS-BLOCK-ACK from peer */ + [] NSCP.receive(tr_NS_BLOCK_ACK(g_nsvc_config.nsvci)) -> value rf { + } [] Tns_block.timeout { /* repeat unblock transmission */ f_sendUnblock(); @@ -583,6 +586,9 @@ module NS_Emulation { [] NSCP.receive(tr_NS_BLOCK_ACK(g_nsvc_config.nsvci)) -> value rf { Tns_block.stop; } + /* tolerate a late NS-UNBLOCK-ACK from peer */ + [] NSCP.receive(t_NS_UNBLOCK_ACK) -> value rf { + } /* NS-UNITDATA PDU from network to NS-UNITDATA.ind to user */ [] NSCP.receive(tr_NS_UNITDATA(?, ?, ?)) -> value rf { NS_SP.send(ts_NsUdInd(g_config.nsei, g_nsvc_config.nsvci,