aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2017-06-19 11:24:47 +0100
committerJoe MacDonald <joe_macdonald@mentor.com>2017-06-28 10:29:12 -0400
commitcf95634bf4d8641f26711a2bf8490fec0d8f0007 (patch)
treead1a39f3e7142e032fb5dc4a6db8b99000e23ff2 /meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch
parentcf9a6a2bbc85649a589c432330ad8308ab9a6ce6 (diff)
downloadmeta-openembedded-contrib-cf95634bf4d8641f26711a2bf8490fec0d8f0007.tar.gz
nftables: backport a few ICMP & ICMPv6 fixes
- assign network ctx for ICMP & ICMPv6 - additional ICMPv6 types - allow update of net base w. meta l4proto ipv6-icmp - l4 proto fixes The initial trigger was that ICMPv6 type 143 (mld2-listener-report) wasn't working as expected. Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch')
-rw-r--r--meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch b/meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch
new file mode 100644
index 0000000000..50cac300e8
--- /dev/null
+++ b/meta-networking/recipes-filter/nftables/files/0003-payload-split-ll-proto-dependency-into-helper.patch
@@ -0,0 +1,62 @@
+From 8d8cfe5ad6ca460a5262fb15fdbef3601058c784 Mon Sep 17 00:00:00 2001
+From: Florian Westphal <fw@strlen.de>
+Date: Thu, 18 May 2017 13:30:54 +0200
+Subject: [PATCH 1/4] payload: split ll proto dependency into helper
+
+will be re-used in folloup patch for icmp/icmpv6 depenency
+handling.
+
+Signed-off-by: Florian Westphal <fw@strlen.de>
+---
+Upstream-Status: Backport
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+ src/payload.c | 29 ++++++++++++++++++-----------
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/src/payload.c b/src/payload.c
+index 55128fe..31e5a02 100644
+--- a/src/payload.c
++++ b/src/payload.c
+@@ -224,21 +224,28 @@ static int payload_add_dependency(struct eval_ctx *ctx,
+ }
+
+ static const struct proto_desc *
++payload_get_get_ll_hdr(const struct eval_ctx *ctx)
++{
++ switch (ctx->pctx.family) {
++ case NFPROTO_INET:
++ return &proto_inet;
++ case NFPROTO_BRIDGE:
++ return &proto_eth;
++ case NFPROTO_NETDEV:
++ return &proto_netdev;
++ default:
++ break;
++ }
++
++ return NULL;
++}
++
++static const struct proto_desc *
+ payload_gen_special_dependency(struct eval_ctx *ctx, const struct expr *expr)
+ {
+ switch (expr->payload.base) {
+ case PROTO_BASE_LL_HDR:
+- switch (ctx->pctx.family) {
+- case NFPROTO_INET:
+- return &proto_inet;
+- case NFPROTO_BRIDGE:
+- return &proto_eth;
+- case NFPROTO_NETDEV:
+- return &proto_netdev;
+- default:
+- break;
+- }
+- break;
++ return payload_get_get_ll_hdr(ctx);
+ case PROTO_BASE_TRANSPORT_HDR:
+ if (expr->payload.desc == &proto_icmp)
+ return &proto_ip;
+--
+2.11.0
+