nftables will assert in some cases because the sanity check is done even
for network and transport header bases.
However, stacked headers are only supported for the link layer.
Move the assertion around and add a test case for this.
Signed-off-by: Florian Westphal <fw@strlen.de>
assert(desc->base <= PROTO_BASE_MAX);
if (desc->base == base->base) {
- assert(base->length > 0);
-
if (!left->payload.is_raw) {
if (desc->base == PROTO_BASE_LL_HDR &&
ctx->stacked_ll_count < PROTO_CTX_NUM_PROTOS) {
+ assert(base->length > 0);
ctx->stacked_ll[ctx->stacked_ll_count] = base;
ctx->stacked_ll_count++;
}
--- /dev/null
+x x comp nexthdr comp