mirror of
https://github.com/thelsing/knx.git
synced 2025-05-12 01:15:12 +02:00
fix some bugs in tunneling support detected by the usage of esp32 (heap corruption)
This commit is contained in:
parent
df4ce55e3f
commit
f3dfbce69e
@ -30,6 +30,7 @@ See the examples for basic usage options
|
|||||||
- increase device object api version to 2 (invalidation of knx flash data stored by older versions)
|
- increase device object api version to 2 (invalidation of knx flash data stored by older versions)
|
||||||
- add #pragma once to Arduino plattform to allow derived plattforms
|
- add #pragma once to Arduino plattform to allow derived plattforms
|
||||||
- change esp32 plattform to use KNX_NETIF
|
- change esp32 plattform to use KNX_NETIF
|
||||||
|
- fix out-of-boundary write and dereferenced nullpointer access in tunneling support
|
||||||
|
|
||||||
### V2.1.1 - 2024-09-16
|
### V2.1.1 - 2024-09-16
|
||||||
- fix minor bug in TP-Uart Driver (RX queue out of boundary)
|
- fix minor bug in TP-Uart Driver (RX queue out of boundary)
|
||||||
|
@ -766,8 +766,8 @@ void IpDataLinkLayer::loopHandleConnectRequest(uint8_t* buffer, uint16_t length,
|
|||||||
tun = nullptr;
|
tun = nullptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(tun)
|
||||||
tun->IndividualAddress = tunPa;
|
tun->IndividualAddress = tunPa;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class IpDataLinkLayer : public DataLinkLayer
|
|||||||
DataLinkLayerCallbacks* _dllcb;
|
DataLinkLayerCallbacks* _dllcb;
|
||||||
#ifdef KNX_TUNNELING
|
#ifdef KNX_TUNNELING
|
||||||
KnxIpTunnelConnection tunnels[KNX_TUNNELING];
|
KnxIpTunnelConnection tunnels[KNX_TUNNELING];
|
||||||
uint8_t _lastChannelId = 1;
|
uint8_t _lastChannelId = 0;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
@ -17,7 +17,8 @@ KnxIpConnectResponse::KnxIpConnectResponse(IpParameterObject& parameters, uint16
|
|||||||
|
|
||||||
_crd.length((type == 4) ? 4 : 2); //TunnelConnectionResponse length = 4; ConfigConnectionResponse length = 2;
|
_crd.length((type == 4) ? 4 : 2); //TunnelConnectionResponse length = 4; ConfigConnectionResponse length = 2;
|
||||||
_crd.type(type);
|
_crd.type(type);
|
||||||
_crd.address(address);
|
if(type == 4) // only fill address when it is a TunnelConnectionResponse
|
||||||
|
_crd.address(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
KnxIpConnectResponse::KnxIpConnectResponse(uint8_t channel, uint8_t errorCode)
|
KnxIpConnectResponse::KnxIpConnectResponse(uint8_t channel, uint8_t errorCode)
|
||||||
|
Loading…
Reference in New Issue
Block a user