-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Boos4721 <[email protected]>
- Loading branch information
Showing
7 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LINUX_VERSION-5.18 = .12 | ||
LINUX_KERNEL_HASH-5.18.12 = 40b74d0942f255da07481710e1083412d06e37e45b8f9d9e34ae856db37b9527 | ||
LINUX_VERSION-5.18 = .13 | ||
LINUX_KERNEL_HASH-5.18.13 = 430e1affe62fcca274f217b150290995a33ceb0d5ad5e72ca6ee8a2d28276bda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
|
||
--- a/include/net/netfilter/nf_conntrack_ecache.h | ||
+++ b/include/net/netfilter/nf_conntrack_ecache.h | ||
@@ -83,9 +83,14 @@ struct nf_ct_event_notifier { | ||
@@ -81,9 +81,14 @@ struct nf_ct_event_notifier { | ||
int (*exp_event)(unsigned int events, const struct nf_exp_event *item); | ||
}; | ||
|
||
|
@@ -38,7 +38,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
|
||
void nf_ct_deliver_cached_events(struct nf_conn *ct); | ||
int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, | ||
@@ -111,11 +116,13 @@ static inline void | ||
@@ -109,11 +114,13 @@ static inline void | ||
nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) | ||
{ | ||
#ifdef CONFIG_NF_CONNTRACK_EVENTS | ||
|
@@ -53,7 +53,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
|
||
e = nf_ct_ecache_find(ct); | ||
if (e == NULL) | ||
@@ -130,10 +137,12 @@ nf_conntrack_event_report(enum ip_conntr | ||
@@ -128,10 +135,12 @@ nf_conntrack_event_report(enum ip_conntr | ||
u32 portid, int report) | ||
{ | ||
#ifdef CONFIG_NF_CONNTRACK_EVENTS | ||
|
@@ -66,7 +66,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
|
||
return nf_conntrack_eventmask_report(1 << event, ct, portid, report); | ||
#else | ||
@@ -145,10 +154,12 @@ static inline int | ||
@@ -143,10 +152,12 @@ static inline int | ||
nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct) | ||
{ | ||
#ifdef CONFIG_NF_CONNTRACK_EVENTS | ||
|
@@ -81,7 +81,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
#else | ||
--- a/include/net/netns/conntrack.h | ||
+++ b/include/net/netns/conntrack.h | ||
@@ -113,6 +113,9 @@ struct netns_ct { | ||
@@ -112,6 +112,9 @@ struct netns_ct { | ||
|
||
struct ct_pcpu __percpu *pcpu_lists; | ||
struct ip_conntrack_stat __percpu *stat; | ||
|
@@ -110,7 +110,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
depends on NETFILTER_ADVANCED | ||
--- a/net/netfilter/nf_conntrack_core.c | ||
+++ b/net/netfilter/nf_conntrack_core.c | ||
@@ -2815,6 +2815,10 @@ int nf_conntrack_init_net(struct net *ne | ||
@@ -2837,6 +2837,10 @@ int nf_conntrack_init_net(struct net *ne | ||
nf_conntrack_helper_pernet_init(net); | ||
nf_conntrack_proto_pernet_init(net); | ||
|
||
|
@@ -123,17 +123,17 @@ Signed-off-by: Zhi Chen <[email protected]> | |
err_expect: | ||
--- a/net/netfilter/nf_conntrack_ecache.c | ||
+++ b/net/netfilter/nf_conntrack_ecache.c | ||
@@ -18,6 +18,9 @@ | ||
@@ -17,6 +17,9 @@ | ||
#include <linux/stddef.h> | ||
#include <linux/err.h> | ||
#include <linux/percpu.h> | ||
#include <linux/kernel.h> | ||
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS | ||
+#include <linux/notifier.h> | ||
+#endif | ||
#include <linux/netdevice.h> | ||
#include <linux/slab.h> | ||
#include <linux/export.h> | ||
@@ -168,6 +171,35 @@ static int __nf_conntrack_eventmask_repo | ||
@@ -162,6 +165,35 @@ static int __nf_conntrack_eventmask_repo | ||
return ret; | ||
} | ||
|
||
|
@@ -169,7 +169,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
int nf_conntrack_eventmask_report(unsigned int events, struct nf_conn *ct, | ||
u32 portid, int report) | ||
{ | ||
@@ -204,10 +236,52 @@ int nf_conntrack_eventmask_report(unsign | ||
@@ -197,10 +229,52 @@ int nf_conntrack_eventmask_report(unsign | ||
|
||
return ret; | ||
} | ||
|
@@ -222,15 +222,15 @@ Signed-off-by: Zhi Chen <[email protected]> | |
void nf_ct_deliver_cached_events(struct nf_conn *ct) | ||
{ | ||
struct nf_conntrack_ecache *e; | ||
@@ -233,6 +307,7 @@ void nf_ct_deliver_cached_events(struct | ||
@@ -226,6 +300,7 @@ void nf_ct_deliver_cached_events(struct | ||
*/ | ||
__nf_conntrack_eventmask_report(e, events, e->missed, &item); | ||
} | ||
+#endif | ||
EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events); | ||
|
||
void nf_ct_expect_event_report(enum ip_conntrack_expect_events event, | ||
@@ -265,20 +340,43 @@ out_unlock: | ||
@@ -258,20 +333,43 @@ out_unlock: | ||
rcu_read_unlock(); | ||
} | ||
|
||
|
@@ -276,7 +276,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
void nf_conntrack_unregister_notifier(struct net *net) | ||
{ | ||
mutex_lock(&nf_ct_ecache_mutex); | ||
@@ -286,6 +384,7 @@ void nf_conntrack_unregister_notifier(st | ||
@@ -279,6 +377,7 @@ void nf_conntrack_unregister_notifier(st | ||
mutex_unlock(&nf_ct_ecache_mutex); | ||
/* synchronize_rcu() is called after netns pre_exit */ | ||
} | ||
|
@@ -306,7 +306,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
struct nf_conn *ct = item->ct; | ||
struct sk_buff *skb; | ||
unsigned int type; | ||
@@ -3772,11 +3779,17 @@ static int ctnetlink_stat_exp_cpu(struct | ||
@@ -3825,11 +3832,17 @@ static int ctnetlink_stat_exp_cpu(struct | ||
} | ||
|
||
#ifdef CONFIG_NF_CONNTRACK_EVENTS | ||
|
@@ -324,7 +324,7 @@ Signed-off-by: Zhi Chen <[email protected]> | |
|
||
static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = { | ||
[IPCTNL_MSG_CT_NEW] = { | ||
@@ -3875,8 +3888,12 @@ static int __net_init ctnetlink_net_init | ||
@@ -3928,8 +3941,12 @@ static int __net_init ctnetlink_net_init | ||
static void ctnetlink_net_pre_exit(struct net *net) | ||
{ | ||
#ifdef CONFIG_NF_CONNTRACK_EVENTS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <[email protected]> | |
#include <net/net_namespace.h> | ||
#ifdef CONFIG_SYSCTL | ||
#include <linux/sysctl.h> | ||
@@ -462,6 +463,56 @@ static int ct_cpu_seq_show(struct seq_fi | ||
@@ -465,6 +466,56 @@ static int ct_cpu_seq_show(struct seq_fi | ||
return 0; | ||
} | ||
|
||
|
@@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <[email protected]> | |
static const struct seq_operations ct_cpu_seq_ops = { | ||
.start = ct_cpu_seq_start, | ||
.next = ct_cpu_seq_next, | ||
@@ -475,8 +526,9 @@ static int nf_conntrack_standalone_init_ | ||
@@ -478,8 +529,9 @@ static int nf_conntrack_standalone_init_ | ||
kuid_t root_uid; | ||
kgid_t root_gid; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,15 +40,15 @@ Signed-off-by: Christian 'Ansuel' Marangi <[email protected]> | |
|
||
--- a/net/netfilter/nf_conntrack_standalone.c | ||
+++ b/net/netfilter/nf_conntrack_standalone.c | ||
@@ -633,6 +633,7 @@ enum nf_ct_sysctl_index { | ||
@@ -636,6 +636,7 @@ enum nf_ct_sysctl_index { | ||
#endif | ||
NF_SYSCTL_CT_PROTO_TCP_LOOSE, | ||
NF_SYSCTL_CT_PROTO_TCP_LIBERAL, | ||
+ NF_SYSCTL_CT_PROTO_TCP_NO_WINDOW_CHECK, | ||
NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST, | ||
NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS, | ||
NF_SYSCTL_CT_PROTO_TIMEOUT_UDP, | ||
@@ -849,6 +850,14 @@ static struct ctl_table nf_ct_sysctl_tab | ||
@@ -852,6 +853,14 @@ static struct ctl_table nf_ct_sysctl_tab | ||
.extra1 = SYSCTL_ZERO, | ||
.extra2 = SYSCTL_ONE, | ||
}, | ||
|
@@ -63,7 +63,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <[email protected]> | |
[NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST] = { | ||
.procname = "nf_conntrack_tcp_ignore_invalid_rst", | ||
.maxlen = sizeof(u8), | ||
@@ -1065,6 +1074,7 @@ static void nf_conntrack_standalone_init | ||
@@ -1068,6 +1077,7 @@ static void nf_conntrack_standalone_init | ||
|
||
XASSIGN(LOOSE, &tn->tcp_loose); | ||
XASSIGN(LIBERAL, &tn->tcp_be_liberal); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters