--- zzzz-none-000/linux-4.9.279/net/netfilter/nf_queue.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/net/netfilter/nf_queue.c 2023-02-08 11:43:43.000000000 +0000 @@ -16,7 +16,9 @@ #include #include #include - +#if defined(CONFIG_APPCPU_GW_PP_HANDLE) || defined(CONFIG_TI_PACKET_PROCESSOR) +#include +#endif /* CONFIG_APPCPU_GW_PP_HANDLE || CONFIG_TI_PACKET_PROCESSOR*/ #include "nf_internals.h" /* @@ -228,6 +230,38 @@ case NF_STOLEN: break; default: +#if defined(CONFIG_APPCPU_GW_PP_HANDLE) || defined(CONFIG_TI_PACKET_PROCESSOR) + { + int skip_pp_discard=0; + struct ethhdr* ptr_ethhdr = NULL; + +#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]) )) + + 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; + printk(KERN_DEBUG "NF_DROP :Multicast pkg, Do not create PP drop session\n" ); + } + } + + if ( ! skip_pp_discard ) + { + ti_hil_pp_event (TI_CT_NETFILTER_DISCARD_PKT, (void *)skb); + } + } +#endif /* CONFIG_APPCPU_GW_PP_HANDLE || CONFIG_TI_PACKET_PROCESSOR*/ kfree_skb(skb); }