From bdf93a8abfc1afc075f91c7c677f03d2a913e514 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 9 Nov 2018 13:57:16 -0600 Subject: [PATCH] net/arp/arp_send.c: Check ifname match before sending packet --- net/arp/arp_send.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c index ea54b4427c..6e56779064 100644 --- a/net/arp/arp_send.c +++ b/net/arp/arp_send.c @@ -107,6 +107,16 @@ static uint16_t arp_send_eventhandler(FAR struct net_driver_s *dev, 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 */ if ((flags & NETDEV_DOWN) != 0)