From 8934f10282d0ad6a65bf5e537c90894071a1c07a Mon Sep 17 00:00:00 2001 From: Ing-Dom Date: Sat, 24 Feb 2024 15:56:45 +0100 Subject: [PATCH] quickfix Tunnel PA fixes https://github.com/OpenKNX/OAM-IP-Router/issues/12 --- src/knx/ip_data_link_layer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/knx/ip_data_link_layer.cpp b/src/knx/ip_data_link_layer.cpp index 6c6fa005..0e8fa615 100644 --- a/src/knx/ip_data_link_layer.cpp +++ b/src/knx/ip_data_link_layer.cpp @@ -469,6 +469,7 @@ void IpDataLinkLayer::loopHandleConnectRequest(uint8_t* buffer, uint16_t length) uint16_t propval = 0; _ipParameters.readProperty(PID_ADDITIONAL_INDIVIDUAL_ADDRESSES, 0, count, (uint8_t*)&propval); const uint8_t *addresses; + propval = htons(propval); if(propval == KNX_TUNNELING) { addresses = _ipParameters.propertyData(PID_ADDITIONAL_INDIVIDUAL_ADDRESSES); @@ -482,6 +483,8 @@ void IpDataLinkLayer::loopHandleConnectRequest(uint8_t* buffer, uint16_t length) addrbuffer[i*2+1] = i+1; addrbuffer[i*2] = _deviceObject.individualAddress() / 0x0100; } + count = KNX_TUNNELING; + _ipParameters.writeProperty(PID_ADDITIONAL_INDIVIDUAL_ADDRESSES, 1, addrbuffer, count); #ifdef KNX_LOG_TUNNELING println("no Tunnel-PAs configured, using own subnet"); #endif