X-Git-Url: https://git.distorted.org.uk/~mdw/dnserr/blobdiff_plain/4ee49a0e5e42fe3995ad42f872c270d118a23c6c..HEAD:/Makefile diff --git a/Makefile b/Makefile index d1c6653..802cd43 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ all: DUMMY = refused wrong-ds DUMMYZONES = $(addsuffix .zone,$(DUMMY)) TARGETS += $(DUMMYZONES) -$(DUMMYZONES): %.zone: utils.m4 dummy.in +$(DUMMYZONES): %.zone: utils.m4 config.m4 dummy.in m4 -P -DBASE=$(BASE) >$@.new utils.m4 dummy.in mv $@.new $@ @@ -57,9 +57,9 @@ dnserr.zone.sigold: dnserr.zone key/$(ZONE).stamp TARGETS += dnserr.zone.sig OLDSIGMATCH = $$1 == "expired-rrsig.$(ZONE)." && \ - $$4 == "RRSIG" && $$5 == "A" + $$4 == "RRSIG" && ($$5 == "A" || $$5 == "AAAA") BADSIGMATCH = $$1 == "invalid-rrsig.$(ZONE)." && \ - $$4 == "RRSIG" && $$5 == "A" + $$4 == "RRSIG" && ($$5 == "A" || $$5 == "AAAA") CLEAN += t.oldsig dnserr.zone.sig: dnserr.zone.sigold dnserr.zone.signew awk '$(OLDSIGMATCH) { print; }' \ @@ -68,7 +68,16 @@ dnserr.zone.sig: dnserr.zone.sigold dnserr.zone.signew if (!doneoldsig) { system("cat t.oldsig"); doneoldsig = 1; } \ next; \ } \ - { gsub(/invalid-rrsigx/, "invalid-rrsig"); print; }' \ + $(BADSIGMATCH) { \ + s = $$13; \ + for (i = length(s)/2; i > 0; i--) { \ + c = substr(s, i, 1); \ + if (c != tolower(c)) { c = tolower(c); break; } \ + else if (c != toupper(c)) { c = toupper(c); break; } \ + } \ + $$13 = substr(s, 1, i - 1) c substr(s, i + 1); \ + } \ + { print; }' \ dnserr.zone.signew >$@.new rm t.oldsig mv $@.new $@ @@ -80,3 +89,5 @@ all: $(TARGETS) clean::; rm -f $(CLEAN) realclean:: clean; rm -f $(REALCLEAN) .PHONY: clean realclean + +-include local.mk