Skip to content

Commit

Permalink
uses remote addr for SearchRequest when hpai is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
traxanos committed Feb 6, 2024
1 parent a55f0fa commit 9bac3fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/knx/ip_data_link_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ void IpDataLinkLayer::loop()
if(_dllcb)
_dllcb->activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR) | (KNX_ACTIVITYCALLBACK_IPUNICAST));
#endif
_platform.sendBytesUniCast(hpai.ipAddress(), hpai.ipPortNumber(), searchResponse.data(), searchResponse.totalLength());
if(hpai.ipAddress()) {
remoteAddr = hpai.ipAddress();
remotePort = hpai.ipPortNumber();
}
_platform.sendBytesUniCast(remoteAddr, remotePort, searchResponse.data(), searchResponse.totalLength());
break;
}
case SearchRequestExt:
Expand Down

0 comments on commit 9bac3fd

Please sign in to comment.