--- zzzz-none-000/linux-4.1.52/net/netfilter/nf_conntrack_h323_main.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/net/netfilter/nf_conntrack_h323_main.c 2022-03-02 11:37:14.000000000 +0000 @@ -33,6 +33,9 @@ #include #include #include +#if defined(CONFIG_BCM_KF_NETFILTER) +#include +#endif /* Parameters */ static unsigned int default_rrq_ttl __read_mostly = 300; @@ -325,6 +328,11 @@ nf_ct_expect_put(rtp_exp); nf_ct_expect_put(rtcp_exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_UDP, rtp_port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); + iqos_add_L4port( IPPROTO_UDP, rtcp_port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -377,6 +385,10 @@ nf_ct_expect_put(exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_TCP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -723,6 +735,10 @@ nf_ct_expect_put(exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_TCP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -852,6 +868,10 @@ nf_ct_expect_put(exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_TCP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -1340,6 +1360,10 @@ nf_ct_expect_put(exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_TCP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -1403,6 +1427,10 @@ nf_ct_expect_put(exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_UDP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -1619,6 +1647,10 @@ nf_ct_expect_put(exp); +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_TCP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -1677,6 +1709,10 @@ /* Ignore rasAddress */ +#if defined(CONFIG_BCM_KF_NETFILTER) + iqos_add_L4port( IPPROTO_TCP, port, IQOS_ENT_DYN, IQOS_PRIO_HIGH ); +#endif + return ret; } @@ -1834,6 +1870,16 @@ /****************************************************************************/ static void __exit nf_conntrack_h323_fini(void) { +#if defined(CONFIG_BCM_KF_NETFILTER) + /* unregister the Q.931 ports with ingress QoS classifier */ + iqos_rem_L4port( nf_conntrack_helper_q931[0].tuple.dst.protonum, + nf_conntrack_helper_q931[0].tuple.src.u.tcp.port, IQOS_ENT_STAT ); + + /* unregister the RAS ports with ingress QoS classifier */ + iqos_rem_L4port( nf_conntrack_helper_ras[0].tuple.dst.protonum, + nf_conntrack_helper_ras[0].tuple.src.u.udp.port, IQOS_ENT_STAT ); +#endif + nf_conntrack_helper_unregister(&nf_conntrack_helper_ras[1]); nf_conntrack_helper_unregister(&nf_conntrack_helper_ras[0]); nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[1]); @@ -1867,6 +1913,17 @@ if (ret < 0) goto err5; pr_debug("nf_ct_h323: init success\n"); +#if defined(CONFIG_BCM_KF_NETFILTER) + /* register the Q.931 ports with ingress QoS classifier */ + iqos_add_L4port( nf_conntrack_helper_q931[0].tuple.dst.protonum, + nf_conntrack_helper_q931[0].tuple.src.u.tcp.port, + IQOS_ENT_STAT, IQOS_PRIO_HIGH ); + + /* register the RAS ports with ingress QoS classifier */ + iqos_add_L4port( nf_conntrack_helper_ras[0].tuple.dst.protonum, + nf_conntrack_helper_ras[0].tuple.src.u.udp.port, + IQOS_ENT_STAT, IQOS_PRIO_HIGH ); +#endif return 0; err5: