From 55a078c417965966d8e3caaebaf6c5b0c5c7c531 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 29 Apr 2024 13:26:42 +0200 Subject: [PATCH] Remove DSCP patche in 6.1 fir qualcommax --- ...nss-ecm-support-netfilter-DSCPREMARK.patch | 154 ------------------ 1 file changed, 154 deletions(-) delete mode 100644 6.1/target/linux/qualcommax/patches-6.1/0600-6-qca-nss-ecm-support-netfilter-DSCPREMARK.patch diff --git a/6.1/target/linux/qualcommax/patches-6.1/0600-6-qca-nss-ecm-support-netfilter-DSCPREMARK.patch b/6.1/target/linux/qualcommax/patches-6.1/0600-6-qca-nss-ecm-support-netfilter-DSCPREMARK.patch deleted file mode 100644 index f9480406..00000000 --- a/6.1/target/linux/qualcommax/patches-6.1/0600-6-qca-nss-ecm-support-netfilter-DSCPREMARK.patch +++ /dev/null @@ -1,154 +0,0 @@ ---- a/net/netfilter/Kconfig -+++ b/net/netfilter/Kconfig -@@ -175,6 +175,13 @@ config NF_CONNTRACK_TIMEOUT - - If unsure, say `N'. - -+config NF_CONNTRACK_DSCPREMARK_EXT -+ bool 'Connection tracking extension for dscp remark target' -+ depends on NETFILTER_ADVANCED -+ help -+ This option enables support for connection tracking extension -+ for dscp remark. -+ - config NF_CONNTRACK_TIMESTAMP - bool 'Connection tracking timestamping' - depends on NETFILTER_ADVANCED ---- a/include/net/netfilter/nf_conntrack_extend.h -+++ b/include/net/netfilter/nf_conntrack_extend.h -@@ -31,6 +31,10 @@ enum nf_ct_ext_id { - #if IS_ENABLED(CONFIG_NET_ACT_CT) - NF_CT_EXT_ACT_CT, - #endif -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ NF_CT_EXT_DSCPREMARK, /* QCA NSS ECM support */ -+#endif -+ - NF_CT_EXT_NUM, - }; - ---- a/net/netfilter/nf_conntrack_extend.c -+++ b/net/netfilter/nf_conntrack_extend.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - - #define NF_CT_EXT_PREALLOC 128u /* conntrack events are on by default */ -@@ -54,6 +55,9 @@ static const u8 nf_ct_ext_type_len[NF_CT - #if IS_ENABLED(CONFIG_NET_ACT_CT) - [NF_CT_EXT_ACT_CT] = sizeof(struct nf_conn_act_ct_ext), - #endif -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ [NF_CT_EXT_DSCPREMARK] = sizeof(struct nf_ct_dscpremark_ext), -+#endif - }; - - static __always_inline unsigned int total_extension_size(void) -@@ -86,6 +90,9 @@ static __always_inline unsigned int tota - #if IS_ENABLED(CONFIG_NET_ACT_CT) - + sizeof(struct nf_conn_act_ct_ext) - #endif -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ + sizeof(struct nf_ct_dscpremark_ext) -+#endif - ; - } - ---- a/net/netfilter/Makefile -+++ b/net/netfilter/Makefile -@@ -14,6 +14,7 @@ nf_conntrack-$(CONFIG_NF_CONNTRACK_LABEL - nf_conntrack-$(CONFIG_NF_CT_PROTO_DCCP) += nf_conntrack_proto_dccp.o - nf_conntrack-$(CONFIG_NF_CT_PROTO_SCTP) += nf_conntrack_proto_sctp.o - nf_conntrack-$(CONFIG_NF_CT_PROTO_GRE) += nf_conntrack_proto_gre.o -+nf_conntrack-$(CONFIG_NF_CONNTRACK_DSCPREMARK_EXT) += nf_conntrack_dscpremark_ext.o - ifeq ($(CONFIG_NF_CONNTRACK),m) - nf_conntrack-$(CONFIG_DEBUG_INFO_BTF_MODULES) += nf_conntrack_bpf.o - else ifeq ($(CONFIG_NF_CONNTRACK),y) ---- a/net/netfilter/nf_conntrack_core.c -+++ b/net/netfilter/nf_conntrack_core.c -@@ -45,6 +45,9 @@ - #include - #include - #include -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+#include -+#endif - #include - #include - #include -@@ -1781,6 +1784,9 @@ init_conntrack(struct net *net, struct n - nf_ct_acct_ext_add(ct, GFP_ATOMIC); - nf_ct_tstamp_ext_add(ct, GFP_ATOMIC); - nf_ct_labels_ext_add(ct); -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ nf_ct_dscpremark_ext_add(ct, GFP_ATOMIC); -+#endif - - #ifdef CONFIG_NF_CONNTRACK_EVENTS - ecache = tmpl ? nf_ct_ecache_find(tmpl) : NULL; ---- a/net/netfilter/xt_DSCP.c -+++ b/net/netfilter/xt_DSCP.c -@@ -15,6 +15,9 @@ - - #include - #include -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+#include -+#endif - - MODULE_AUTHOR("Harald Welte "); - MODULE_DESCRIPTION("Xtables: DSCP/TOS field modification"); -@@ -31,6 +34,10 @@ dscp_tg(struct sk_buff *skb, const struc - { - const struct xt_DSCP_info *dinfo = par->targinfo; - u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT; -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ struct nf_conn *ct; -+ enum ip_conntrack_info ctinfo; -+#endif - - if (dscp != dinfo->dscp) { - if (skb_ensure_writable(skb, sizeof(struct iphdr))) -@@ -39,6 +46,13 @@ dscp_tg(struct sk_buff *skb, const struc - ipv4_change_dsfield(ip_hdr(skb), XT_DSCP_ECN_MASK, - dinfo->dscp << XT_DSCP_SHIFT); - -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ ct = nf_ct_get(skb, &ctinfo); -+ if (!ct) -+ return XT_CONTINUE; -+ -+ nf_conntrack_dscpremark_ext_set_dscp_rule_valid(ct); -+#endif - } - return XT_CONTINUE; - } -@@ -48,13 +62,24 @@ dscp_tg6(struct sk_buff *skb, const stru - { - const struct xt_DSCP_info *dinfo = par->targinfo; - u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT; -- -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ struct nf_conn *ct; -+ enum ip_conntrack_info ctinfo; -+#endif - if (dscp != dinfo->dscp) { - if (skb_ensure_writable(skb, sizeof(struct ipv6hdr))) - return NF_DROP; - - ipv6_change_dsfield(ipv6_hdr(skb), XT_DSCP_ECN_MASK, - dinfo->dscp << XT_DSCP_SHIFT); -+ -+#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT -+ ct = nf_ct_get(skb, &ctinfo); -+ if (!ct) -+ return XT_CONTINUE; -+ -+ nf_conntrack_dscpremark_ext_set_dscp_rule_valid(ct); -+#endif - } - return XT_CONTINUE; - }