--- zzzz-none-000/linux-5.15.111/net/ipv4/netfilter/ip_tables.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/ipv4/netfilter/ip_tables.c 2024-02-07 09:28:09.000000000 +0000 @@ -6,6 +6,13 @@ * Copyright (C) 2000-2005 Netfilter Core Team * Copyright (C) 2006-2010 Patrick McHardy */ + +/* + Includes Intel Corporation's changes/modifications dated: [Mar.2017]. + Changed/modified portions - Copyright © 2017, Intel Corporation + 1. PP Hook +*/ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include @@ -28,6 +35,10 @@ #include #include "../../netfilter/xt_repldata.h" +#ifdef CONFIG_TI_PACKET_PROCESSOR +#include +#endif + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Netfilter Core Team "); MODULE_DESCRIPTION("IPv4 packet filter"); @@ -357,6 +368,20 @@ xt_write_recseq_end(addend); local_bh_enable(); +#ifdef CONFIG_TI_PACKET_PROCESSOR + if (acpar.hotdrop) + { + ti_hil_pp_event (TI_CT_NETFILTER_DISCARD_PKT, (void *)skb); + } + else + { + if (verdict == NF_DROP) + { + ti_hil_pp_event(TI_CT_NETFILTER_DISCARD_PKT, (void *)skb); + } + } +#endif + if (acpar.hotdrop) return NF_DROP; else return verdict; @@ -1089,6 +1114,9 @@ net_warn_ratelimited("iptables: counters copy to user failed while replacing table\n"); } vfree(counters); +#ifdef CONFIG_TI_PACKET_PROCESSOR + ti_hil_pp_event (TI_CT_NETFILTER_TABLE_UPDATE, (void *)t); +#endif //CONFIG_TI_PACKET_PROCESSOR return 0; put_module: