Skip to contentSkip to conversation

conntrack: don't cancel nest on unknown layer 4 protocols

PATCH New Pablo Neira Ayuso 1 participant 1 message Dec 10, 2021 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 conntrack: don't cancel nest on unknown layer 4 protocols

It is valid to specify CTA_PROTO_NUM with a protocol that is not natively supported by conntrack. Do not cancel the CTA_TUPLE_PROTO nest in this case.

---
 src/conntrack/build_mnl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
src/conntrack/build_mnl.c +1 -2
index c3198c57cdcd..af5d0e7ce290 100644
@@ -73,8 +73,7 @@ nfct_build_tuple_proto(struct nlmsghdr *nlh, const struct __nfct_tuple *t)
 		mnl_attr_put_u16(nlh, CTA_PROTO_ICMPV6_ID, t->l4src.icmp.id);
 		break;
 	default:
-		mnl_attr_nest_cancel(nlh, nest);
-		return -1;
+		break;
 	}
 	mnl_attr_nest_end(nlh, nest);
 	return 0;
Signature · 1 line
2.30.2