--- zzzz-none-000/linux-4.1.52/net/netfilter/nf_conntrack_proto_udp.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/net/netfilter/nf_conntrack_proto_udp.c 2022-03-02 11:37:14.000000000 +0000 @@ -88,8 +88,18 @@ /* If we've seen traffic both ways, this is some kind of UDP stream. Extend timeout. */ if (test_bit(IPS_SEEN_REPLY_BIT, &ct->status)) { +#if defined(CONFIG_BCM_KF_NETFILTER) + unsigned timeout = timeouts[UDP_CT_REPLIED]; + if (ct->derived_timeout == 0xFFFFFFFF){ + timeout = 60*60*HZ; + } else if(ct->derived_timeout > 0) { + timeout = ct->derived_timeout; + } + nf_ct_refresh_acct(ct, ctinfo, skb, timeout); +#else nf_ct_refresh_acct(ct, ctinfo, skb, timeouts[UDP_CT_REPLIED]); +#endif /* Also, more likely to be important, and not a probe */ if (!test_and_set_bit(IPS_ASSURED_BIT, &ct->status)) nf_conntrack_event_cache(IPCT_ASSURED, ct); @@ -201,6 +211,7 @@ }; #endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */ + #ifdef CONFIG_SYSCTL static struct ctl_table udp_sysctl_table[] = { { @@ -213,7 +224,7 @@ .procname = "nf_conntrack_udp_timeout_stream", .maxlen = sizeof(unsigned int), .mode = 0644, - .proc_handler = proc_dointvec_jiffies, + .proc_handler = proc_dointvec_jiffies, }, { } }; @@ -229,7 +240,7 @@ .procname = "ip_conntrack_udp_timeout_stream", .maxlen = sizeof(unsigned int), .mode = 0644, - .proc_handler = proc_dointvec_jiffies, + .proc_handler = proc_dointvec_jiffies, }, { } };