conntrack: fix zone sync issue
PATCH 1/1 conntrack: fix zone sync issue
From: Yi Yang <[email protected]>
In some use cases, zone is used to differentiate different conntrack state tables, so zone also should be synchronized if it is set.
--- include/network.h | 1 + src/build.c | 3 +++ src/parse.c | 5 +++++ 3 files changed, 9 insertions(+)
include/network.h +1 -0
@@ -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 };
src/build.c +3 -0
@@ -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
src/parse.c +5 -0
@@ -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
Signature · 1 line
1.8.3.1
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
Quoted 62 lines · On Mon, Oct 19, 2020 at 10:53:13AM +0800, [email protected] wrote:
From: Yi Yang <[email protected]>
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 <[email protected]>--- include/network.h | 1 + src/build.c | 3 +++ src/parse.c | 5 +++++ 3 files changed, 9 insertions(+)include/network.h +1
-0@@ -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 };src/build.c +3
-0@@ -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 voidsrc/parse.c +5
-0@@ -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 voidSignature · 6 lines
1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Signature · 1 line
fbl
Florian Westphal
maintainerQuoted 5 lines · Flavio Leitner
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.
Pablo Neira Ayuso
maintainerHi 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.
Quoted 75 lines · Flavio Leitner
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,
fblQuoted 62 lines · On Mon, Oct 19, 2020 at 10:53:13AM +0800, [email protected] wrote:
From: Yi Yang <[email protected]>
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 <[email protected]>--- include/network.h | 1 + src/build.c | 3 +++ src/parse.c | 5 +++++ 3 files changed, 9 insertions(+)include/network.h +1
-0@@ -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 };src/build.c +3
-0@@ -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 voidsrc/parse.c +5
-0@@ -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 voidSignature · 6 lines
1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-devSignature · 1 line
fbl