From d02d04f13c2959495d6f44b3ee9905b657194133 Mon Sep 17 00:00:00 2001 From: Ing-Dom Date: Mon, 23 Dec 2024 22:40:18 +0100 Subject: [PATCH] fix bug in res tunnel feature --- src/knx/ip_data_link_layer.cpp | 3 +-- src/knx/knx_ip_tunnel_connection.cpp | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/knx/ip_data_link_layer.cpp b/src/knx/ip_data_link_layer.cpp index 78307ff..cdbce9e 100644 --- a/src/knx/ip_data_link_layer.cpp +++ b/src/knx/ip_data_link_layer.cpp @@ -654,8 +654,7 @@ void IpDataLinkLayer::loopHandleConnectRequest(uint8_t* buffer, uint16_t length, tunnelResOptions[i] = (*(tunCtrlBytes+i) & 0x60) >> 5; } - - if(tunnelResActive[i]) // tunnel reserve feature active for this tunnel + if(resTunActive && tunnelResActive[i]) // tunnel reserve feature active for this tunnel { #ifdef KNX_LOG_TUNNELING print("tunnel reserve feature active for this tunnel: "); diff --git a/src/knx/knx_ip_tunnel_connection.cpp b/src/knx/knx_ip_tunnel_connection.cpp index 9d4fe2a..06a04a8 100644 --- a/src/knx/knx_ip_tunnel_connection.cpp +++ b/src/knx/knx_ip_tunnel_connection.cpp @@ -7,6 +7,11 @@ KnxIpTunnelConnection::KnxIpTunnelConnection() void KnxIpTunnelConnection::Reset() { + print("Close Tunnel-Connection["); + print("?"); + print("], Channel: 0x"); + println(ChannelId, 16); + ChannelId = 0; IpAddress = 0; PortData = 0;