--- zzzz-none-000/linux-5.15.111/net/ipv4/netfilter/ip_tables.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/net/ipv4/netfilter/ip_tables.c 2024-02-07 10:23:30.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 (C) 2017, Intel Corporation + 1. PP Hook +*/ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include @@ -25,9 +32,14 @@ #include #include +#include #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 +369,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 +1115,10 @@ net_warn_ratelimited("iptables: counters copy to user failed while replacing table\n"); } vfree(counters); +#if defined(CONFIG_APPCPU_GW_PP_HANDLE) || defined(CONFIG_TI_PACKET_PROCESSOR) + ti_hil_pp_event (TI_CT_NETFILTER_TABLE_UPDATE, (void *)t); +#endif + return 0; put_module: