--- zzzz-none-000/linux-2.6.39.4/net/netfilter/core.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/net/netfilter/core.c 2021-11-10 13:38:18.000000000 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include #include "nf_internals.h" @@ -174,7 +175,40 @@ outdev, &elem, okfn, hook_thresh); if (verdict == NF_ACCEPT || verdict == NF_STOP) { ret = 1; - } else if ((verdict & NF_VERDICT_MASK) == NF_DROP) { + } else if ((verdict & NF_VERDICT_MASK) == 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; + printk(KERN_DEBUG "NF_DROP :Multicast pkg, Do not create PP drop session\n" ); + } + } + + if ( likely( ! skip_pp_discard ) ) + { + ti_hil_pp_event (TI_CT_NETFILTER_DISCARD_PKT, (void *)skb); + } +#endif //CONFIG_TI_PACKET_PROCESSOR + kfree_skb(skb); ret = NF_DROP_GETERR(verdict); if (ret == 0)