icmp: Fixed replies to broadcasts.

This commit is contained in:
Fotis Panagiotopoulos 2022-05-13 12:04:11 +03:00 committed by Xiang Xiao
parent 0a75a9556d
commit 8ef20c230b

View File

@ -103,6 +103,8 @@ void icmp_reply(FAR struct net_driver_s *dev, int type, int code)
if (net_ipv4addr_hdrcmp(ipv4->destipaddr, &any)
# ifdef CONFIG_NET_BROADCAST
|| net_ipv4addr_hdrcmp(ipv4->destipaddr, &bcast)
|| net_ipv4addr_broadcast(net_ip4addr_conv32(ipv4->destipaddr),
dev->d_netmask)
# endif /* CONFIG_NET_BROADCAST */
)
{