--- zzzz-none-000/linux-4.9.279/net/netfilter/nf_queue.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/netfilter/nf_queue.c 2023-02-08 10:58:16.000000000 +0000 @@ -2,6 +2,10 @@ * Rusty Russell (C)2000 -- This code is GPL. * Patrick McHardy (c) 2006-2012 */ +/* +Includes Intel Corporation's changes/modifications dated: 2014. +Changed/modified portions - Copyright © 2014, Intel Corporation. +*/ #include #include @@ -16,6 +20,7 @@ #include #include #include +#include #include "nf_internals.h" @@ -228,6 +233,39 @@ case NF_STOLEN: break; default: +#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); }