]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add coccinelle rule to favor DNS_SIGTYPE
authorMatthijs Mekking <matthijs@isc.org>
Tue, 13 Feb 2024 15:09:44 +0000 (16:09 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 14 Feb 2024 08:00:27 +0000 (09:00 +0100)
This should error if DNS_TYPEPAIR_VALUE(dns_rdatatype_rrsig, type) is
used.

cocci/DNS_TYPEPAIR_VALUE.spatch [new file with mode: 0644]

diff --git a/cocci/DNS_TYPEPAIR_VALUE.spatch b/cocci/DNS_TYPEPAIR_VALUE.spatch
new file mode 100644 (file)
index 0000000..4c51294
--- /dev/null
@@ -0,0 +1,7 @@
+@@
+identifier RRSIG = dns_rdatatype_rrsig;
+expression T;
+@@
+
+- DNS_TYPEPAIR_VALUE(RRSIG, T)
++ DNS_SIGTYPE(T)