> On Fri, 20 Mar 2026 17:45:24 +0100
> Robin Jarry <[email protected]> wrote:
> 
> > +   dst = rte_pktmbuf_mtod(mbuf, struct rte_ether_addr *);
> > +
> > +   if (likely(rte_is_unicast_ether_addr(dst))) {

The NULL addr check should go here:
    if (unlikely(rte_is_zero_ether_addr(dst)))
        return false; /* Invalid destination address in packet */

> > +           for (i = 0; i < TAP_MAX_MAC_ADDRS; i++) {
> > +                   if (rte_is_same_ether_addr(dst, &data->mac_addrs[i]))
> > +                           return true;
> > +           }
> > +           return false;
> > +   }
> 
> Since unused slots are zero, probably need to drop packets with all
> zero dest.

You should drop packets with NULL dst addr; it is not allowed on the wire.

Alternatively, you can put the broadcast address in the unused entries in the 
mac_addrs table; it will not match any unicast ether addr.

Reply via email to