knxd / knxd

GNU General Public License v2.0
539 stars 201 forks source link

Add default zero-HPAI when using NAT tunnel #567

Closed farmio closed 8 months ago

farmio commented 8 months ago

Default to zero HPAI when using a tunnel in NAT mode.

From the KNX Specifications v2.1 03_08_02 Core v01.05.01 AS.pdf

8.6.3.5 Network Address Translation (NAT) If KNXnet/IP communication has to traverse across network routers using Network Address Translation (NAT) the KNXnet/IP Client shall set the value of the IP address and/or the port number in the HPAI to zero to indicate NAT traversal to the receiving KNXnet/IP Server. For the IP address and port number in the datagrams sent from the KNXnet/IP Server to the KNXnet/IP Client the KNXnet/IP Server shall replace the zero value for the IP address and/or the port number in the HPAI by the corresponding IP address and/or port number in the IP package received and use this value as the target IP address or port number for the response to the KNXnet/IP Client.