--- zzzz-none-000/linux-5.15.111/net/netfilter/core.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/netfilter/core.c 2024-02-07 09:28:10.000000000 +0000 @@ -6,6 +6,10 @@ * * This code is GPL. */ +/* +Includes Intel Corporation's changes/modifications dated: 2014. +Changed/modified portions - Copyright © 2014, Intel Corporation. +*/ #include #include #include @@ -25,6 +29,7 @@ #include #include #include +#include #include "nf_internals.h" @@ -591,13 +596,43 @@ switch (verdict & NF_VERDICT_MASK) { case NF_ACCEPT: break; - case NF_DROP: + case NF_DROP: { +#ifdef CONFIG_TI_PACKET_PROCESSOR + +#define MAC_ISMULTICAST( pa, hw ) ( ((pa)->hw[0] & 0x01) ) +#define MAC_ISBROADCAST( pa, hw ) ( ~0xFF ==( (~(pa)->hw[0]) | \ + (~(pa)->hw[1]) | \ + (~(pa)->hw[2]) | \ + (~(pa)->hw[3]) | \ + (~(pa)->hw[4]) | \ + (~(pa)->hw[5]) )) + + int skip_pp_discard=0; + struct ethhdr* ptr_ethhdr = NULL; + ptr_ethhdr = eth_hdr(skb); + + if ( ptr_ethhdr) + { + /* Check if the package is the multicast type, but not a broadcast */ + if ( ( ! (MAC_ISBROADCAST (ptr_ethhdr, h_dest)) ) && + ( MAC_ISMULTICAST (ptr_ethhdr, h_dest)) ) + { + skip_pp_discard=1; + } + } + + if ( likely( ! skip_pp_discard ) ) + { + ti_hil_pp_event (TI_CT_NETFILTER_DISCARD_PKT, (void *)skb); + } +#endif //CONFIG_TI_PACKET_PROCESSOR kfree_skb_reason(skb, SKB_DROP_REASON_NETFILTER_DROP); ret = NF_DROP_GETERR(verdict); if (ret == 0) ret = -EPERM; return ret; + } case NF_QUEUE: ret = nf_queue(skb, state, s, verdict); if (ret == 1)