* [PATCH] conntrack: fix zone sync issue
@ 2020-10-19 2:53 yang_y_yi
2020-12-16 20:25 ` [ovs-dev] " Flavio Leitner
0 siblings, 1 reply; 4+ messages in thread
From: yang_y_yi @ 2020-10-19 2:53 UTC (permalink / raw)
To: ovs-dev; +Cc: netfilter-devel, yangyi01, yang_y_yi
From: Yi Yang <yangyi01@inspur.com>
In some use cases, zone is used to differentiate different
conntrack state tables, so zone also should be synchronized
if it is set.
Signed-off-by: Yi Yang <yangyi01@inspur.com>
---
include/network.h | 1 +
src/build.c | 3 +++
src/parse.c | 5 +++++
3 files changed, 9 insertions(+)
diff --git a/include/network.h b/include/network.h
index 95aad82..20def34 100644
--- a/include/network.h
+++ b/include/network.h
@@ -232,6 +232,7 @@ enum nta_attr {
NTA_SNAT_IPV6, /* uint32_t * 4 */
NTA_DNAT_IPV6, /* uint32_t * 4 */
NTA_SYNPROXY, /* struct nft_attr_synproxy */
+ NTA_ZONE, /* uint16_t */
NTA_MAX
};
diff --git a/src/build.c b/src/build.c
index 99ff230..4771997 100644
--- a/src/build.c
+++ b/src/build.c
@@ -315,6 +315,9 @@ void ct2msg(const struct nf_conntrack *ct, struct nethdr *n)
nfct_attr_is_set(ct, ATTR_SYNPROXY_ITS) &&
nfct_attr_is_set(ct, ATTR_SYNPROXY_TSOFF))
ct_build_synproxy(ct, n);
+
+ if (nfct_attr_is_set(ct, ATTR_ZONE))
+ ct_build_u16(ct, ATTR_ZONE, n, NTA_ZONE);
}
static void
diff --git a/src/parse.c b/src/parse.c
index 7e524ed..e97a721 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -205,6 +205,11 @@ static struct ct_parser h[NTA_MAX] = {
.parse = ct_parse_synproxy,
.size = NTA_SIZE(sizeof(struct nta_attr_synproxy)),
},
+ [NTA_ZONE] = {
+ .parse = ct_parse_u16,
+ .attr = ATTR_ZONE,
+ .size = NTA_SIZE(sizeof(uint16_t)),
+ },
};
static void
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [ovs-dev] [PATCH] conntrack: fix zone sync issue
2020-10-19 2:53 [PATCH] conntrack: fix zone sync issue yang_y_yi
@ 2020-12-16 20:25 ` Flavio Leitner
2020-12-16 21:03 ` Florian Westphal
2020-12-17 12:18 ` Pablo Neira Ayuso
0 siblings, 2 replies; 4+ messages in thread
From: Flavio Leitner @ 2020-12-16 20:25 UTC (permalink / raw)
To: yang_y_yi; +Cc: ovs-dev, netfilter-devel
This email has 'To' field pointing to ovs-dev, but the patch
seems to fix another code other than OVS.
You might have realized by now, but in case you're still waiting... :)
Thanks,
fbl
On Mon, Oct 19, 2020 at 10:53:13AM +0800, yang_y_yi@163.com wrote:
> From: Yi Yang <yangyi01@inspur.com>
>
> In some use cases, zone is used to differentiate different
> conntrack state tables, so zone also should be synchronized
> if it is set.
>
> Signed-off-by: Yi Yang <yangyi01@inspur.com>
> ---
> include/network.h | 1 +
> src/build.c | 3 +++
> src/parse.c | 5 +++++
> 3 files changed, 9 insertions(+)
>
> diff --git a/include/network.h b/include/network.h
> index 95aad82..20def34 100644
> --- a/include/network.h
> +++ b/include/network.h
> @@ -232,6 +232,7 @@ enum nta_attr {
> NTA_SNAT_IPV6, /* uint32_t * 4 */
> NTA_DNAT_IPV6, /* uint32_t * 4 */
> NTA_SYNPROXY, /* struct nft_attr_synproxy */
> + NTA_ZONE, /* uint16_t */
> NTA_MAX
> };
>
> diff --git a/src/build.c b/src/build.c
> index 99ff230..4771997 100644
> --- a/src/build.c
> +++ b/src/build.c
> @@ -315,6 +315,9 @@ void ct2msg(const struct nf_conntrack *ct, struct nethdr *n)
> nfct_attr_is_set(ct, ATTR_SYNPROXY_ITS) &&
> nfct_attr_is_set(ct, ATTR_SYNPROXY_TSOFF))
> ct_build_synproxy(ct, n);
> +
> + if (nfct_attr_is_set(ct, ATTR_ZONE))
> + ct_build_u16(ct, ATTR_ZONE, n, NTA_ZONE);
> }
>
> static void
> diff --git a/src/parse.c b/src/parse.c
> index 7e524ed..e97a721 100644
> --- a/src/parse.c
> +++ b/src/parse.c
> @@ -205,6 +205,11 @@ static struct ct_parser h[NTA_MAX] = {
> .parse = ct_parse_synproxy,
> .size = NTA_SIZE(sizeof(struct nta_attr_synproxy)),
> },
> + [NTA_ZONE] = {
> + .parse = ct_parse_u16,
> + .attr = ATTR_ZONE,
> + .size = NTA_SIZE(sizeof(uint16_t)),
> + },
> };
>
> static void
> --
> 1.8.3.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
--
fbl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ovs-dev] [PATCH] conntrack: fix zone sync issue
2020-12-16 20:25 ` [ovs-dev] " Flavio Leitner
@ 2020-12-16 21:03 ` Florian Westphal
2020-12-17 12:18 ` Pablo Neira Ayuso
1 sibling, 0 replies; 4+ messages in thread
From: Florian Westphal @ 2020-12-16 21:03 UTC (permalink / raw)
To: Flavio Leitner; +Cc: yang_y_yi, ovs-dev, netfilter-devel
Flavio Leitner <fbl@sysclose.org> wrote:
>
> This email has 'To' field pointing to ovs-dev, but the patch
> seems to fix another code other than OVS.
>
> You might have realized by now, but in case you're still waiting... :)
Thanks for pointing that out, patch has been applied to conntrack-tools
repo.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ovs-dev] [PATCH] conntrack: fix zone sync issue
2020-12-16 20:25 ` [ovs-dev] " Flavio Leitner
2020-12-16 21:03 ` Florian Westphal
@ 2020-12-17 12:18 ` Pablo Neira Ayuso
1 sibling, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2020-12-17 12:18 UTC (permalink / raw)
To: Flavio Leitner; +Cc: yang_y_yi, ovs-dev, netfilter-devel
Hi Flavio,
The patch below has been in the tree for a while:
https://git.netfilter.org/conntrack-tools/commit/?id=a08af5d26297eb85218a3c3a9e0991001a88cf10
It will be included in the next release.
Thanks.
On Wed, Dec 16, 2020 at 05:25:46PM -0300, Flavio Leitner wrote:
>
> This email has 'To' field pointing to ovs-dev, but the patch
> seems to fix another code other than OVS.
>
> You might have realized by now, but in case you're still waiting... :)
>
> Thanks,
> fbl
>
> On Mon, Oct 19, 2020 at 10:53:13AM +0800, yang_y_yi@163.com wrote:
> > From: Yi Yang <yangyi01@inspur.com>
> >
> > In some use cases, zone is used to differentiate different
> > conntrack state tables, so zone also should be synchronized
> > if it is set.
> >
> > Signed-off-by: Yi Yang <yangyi01@inspur.com>
> > ---
> > include/network.h | 1 +
> > src/build.c | 3 +++
> > src/parse.c | 5 +++++
> > 3 files changed, 9 insertions(+)
> >
> > diff --git a/include/network.h b/include/network.h
> > index 95aad82..20def34 100644
> > --- a/include/network.h
> > +++ b/include/network.h
> > @@ -232,6 +232,7 @@ enum nta_attr {
> > NTA_SNAT_IPV6, /* uint32_t * 4 */
> > NTA_DNAT_IPV6, /* uint32_t * 4 */
> > NTA_SYNPROXY, /* struct nft_attr_synproxy */
> > + NTA_ZONE, /* uint16_t */
> > NTA_MAX
> > };
> >
> > diff --git a/src/build.c b/src/build.c
> > index 99ff230..4771997 100644
> > --- a/src/build.c
> > +++ b/src/build.c
> > @@ -315,6 +315,9 @@ void ct2msg(const struct nf_conntrack *ct, struct nethdr *n)
> > nfct_attr_is_set(ct, ATTR_SYNPROXY_ITS) &&
> > nfct_attr_is_set(ct, ATTR_SYNPROXY_TSOFF))
> > ct_build_synproxy(ct, n);
> > +
> > + if (nfct_attr_is_set(ct, ATTR_ZONE))
> > + ct_build_u16(ct, ATTR_ZONE, n, NTA_ZONE);
> > }
> >
> > static void
> > diff --git a/src/parse.c b/src/parse.c
> > index 7e524ed..e97a721 100644
> > --- a/src/parse.c
> > +++ b/src/parse.c
> > @@ -205,6 +205,11 @@ static struct ct_parser h[NTA_MAX] = {
> > .parse = ct_parse_synproxy,
> > .size = NTA_SIZE(sizeof(struct nta_attr_synproxy)),
> > },
> > + [NTA_ZONE] = {
> > + .parse = ct_parse_u16,
> > + .attr = ATTR_ZONE,
> > + .size = NTA_SIZE(sizeof(uint16_t)),
> > + },
> > };
> >
> > static void
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
> --
> fbl
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-17 12:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 2:53 [PATCH] conntrack: fix zone sync issue yang_y_yi
2020-12-16 20:25 ` [ovs-dev] " Flavio Leitner
2020-12-16 21:03 ` Florian Westphal
2020-12-17 12:18 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.