summaryrefslogtreecommitdiffstats
path: root/src/netlink_delinearize.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-12-08 23:51:59 +0100
committerFlorian Westphal <fw@strlen.de>2020-12-09 18:33:53 +0100
commitd0f3b9eaab8d77eed94ec74e3c91218ca76da34d (patch)
tree56268f5c1a675124662abdc392ea709aed24cbe8 /src/netlink_delinearize.c
parenta45b2bea62ee73f0c30970f0e5fe8a568b844fb8 (diff)
payload: auto-remove simple icmp/icmpv6 dependency expressions
Instead of: icmpv6 type packet-too-big icmpv6 mtu 1280 display just icmpv6 mtu 1280 The dependency added for id/sequence is still kept, its handled by a anon set instead to cover both the echo 'request' and 'reply' cases. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/netlink_delinearize.c')
-rw-r--r--src/netlink_delinearize.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 9faddde6..8b06c4c0 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -1771,6 +1771,9 @@ static void payload_match_expand(struct rule_pp_ctx *ctx,
enum proto_bases base = left->payload.base;
bool stacked;
+ if (ctx->pdctx.icmp_type)
+ ctx->pctx.th_dep.icmp.type = ctx->pdctx.icmp_type;
+
payload_expr_expand(&list, left, &ctx->pctx);
list_for_each_entry(left, &list, list) {