net/arp/arp_send.c: Check ifname match before sending packet

This commit is contained in:
Xiang Xiao 2018-11-09 13:57:16 -06:00 committed by Gregory Nutt
parent 43706cd797
commit bdf93a8abf

View File

@ -107,6 +107,16 @@ static uint16_t arp_send_eventhandler(FAR struct net_driver_s *dev,
if (state) if (state)
{ {
/* Is this the device that we need to route this request? */
if (strncmp((FAR const char *)dev->d_ifname,
(FAR const char *)state->snd_ifname, IFNAMSIZ) != 0)
{
/* No... pass on this one and wait for the device that we want */
return flags;
}
/* Check if the network is still up */ /* Check if the network is still up */
if ((flags & NETDEV_DOWN) != 0) if ((flags & NETDEV_DOWN) != 0)