mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
target: generic: fixes dst_release issue
This commit is contained in:
parent
f903cc8970
commit
e612846e1b
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
|
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
|
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
|
||||||
@@ -0,0 +1,696 @@
|
@@ -0,0 +1,701 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
|
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
|
||||||
+ *
|
+ *
|
||||||
@ -544,10 +544,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ nf_route(xt_net(par), &other_dst, &fl, false, xt_family(par));
|
+ if (!dst_hold_safe(this_dst))
|
||||||
+ if (!other_dst)
|
|
||||||
+ return -ENOENT;
|
+ return -ENOENT;
|
||||||
+
|
+
|
||||||
|
+ nf_route(xt_net(par), &other_dst, &fl, false, xt_family(par));
|
||||||
|
+ if (!other_dst) {
|
||||||
|
+ dst_release(this_dst);
|
||||||
|
+ return -ENOENT;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ nf_default_forward_path(route, this_dst, dir, devs);
|
+ nf_default_forward_path(route, this_dst, dir, devs);
|
||||||
+ nf_default_forward_path(route, other_dst, !dir, devs);
|
+ nf_default_forward_path(route, other_dst, !dir, devs);
|
||||||
+
|
+
|
||||||
|
@ -59,7 +59,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
|
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
|
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
|
||||||
@@ -0,0 +1,697 @@
|
@@ -0,0 +1,702 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
|
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
|
||||||
+ *
|
+ *
|
||||||
@ -505,10 +505,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ nf_route(xt_net(par), &other_dst, &fl, false, xt_family(par));
|
+ if (!dst_hold_safe(this_dst))
|
||||||
+ if (!other_dst)
|
|
||||||
+ return -ENOENT;
|
+ return -ENOENT;
|
||||||
+
|
+
|
||||||
|
+ nf_route(xt_net(par), &other_dst, &fl, false, xt_family(par));
|
||||||
|
+ if (!other_dst) {
|
||||||
|
+ dst_release(this_dst);
|
||||||
|
+ return -ENOENT;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ nf_default_forward_path(route, this_dst, dir, devs);
|
+ nf_default_forward_path(route, this_dst, dir, devs);
|
||||||
+ nf_default_forward_path(route, other_dst, !dir, devs);
|
+ nf_default_forward_path(route, other_dst, !dir, devs);
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user