--- zzzz-none-000/linux-2.6.39.4/net/netfilter/nf_queue.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/net/netfilter/nf_queue.c 2021-11-10 13:23:11.000000000 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include #include "nf_internals.h" @@ -313,7 +314,41 @@ break; case NF_STOLEN: default: - kfree_skb(skb); +#ifdef 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_TI_PACKET_PROCESSOR + + kfree_skb(skb); } rcu_read_unlock(); kfree(entry);