DNAT possibly affects small packets in unexpected ways

I have a custom application that receives multicast packets with a specific multicast address and destination port “B”.

I have a DNAT rule that, when a packet matches 224.0.0.0/8 and a specific destination port “A”, changes the destination port to “B”.

For some reason, when the data length of a packet is below 18 bytes, my custom application fails to receive it, despite my firewall MARK rule detecting that DNAT did change the packet’s destination port to “B”.

After much testing, I noticed that removing the DNAT rule and changing my application to listen on port “A” “resolved” the issue and my application is able to receive the packet.

Why does DNAT affect packet with data length of below 18 bytes differently from packet with data length of 18 bytes and above, and in such a way that the packet itself cannot be received by application running within the router?

Is this possibly a bug?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall