From febca5dadfbaaaa67661b8004008fbc9f5856363 Mon Sep 17 00:00:00 2001 From: cathugger Date: Thu, 19 Jul 2018 14:05:14 +0000 Subject: add missing cidr entry, fix abslimit's IP entry, tweak bind autogen script --- scripts/addmissingcidr.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 scripts/addmissingcidr.sh (limited to 'scripts/addmissingcidr.sh') diff --git a/scripts/addmissingcidr.sh b/scripts/addmissingcidr.sh new file mode 100755 index 0000000..3ee2607 --- /dev/null +++ b/scripts/addmissingcidr.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# adds missing ip/*/*/cidr entries + +cd db || exit 1 +cd ip || exit 1 +for a in * +do + [ -e "$a" ] || continue + ia=$((0x$a)) || exit 1 + cd "$a" || exit 1 + for b in * + do + [ -e "$b" ] || continue + ib=$((0x$b)) || exit 1 + cd "$b" || exit 1 + for c in * + do + [ -e "$c" ] || continue + ic=$((0x$c)) || exit 1 + cd "$c" || exit 1 + if [ ! -e cidr ] + then + printf "%d.%d.%d.0/24\n" "$ia" "$ib" "$ic"> cidr + printf "ip/%s/%s/%s %d.%d.%d.0/24\n" "$a" "$b" "$c" "$ia" "$ib" "$ic" >&2 + fi + cd .. + done + cd .. + done + cd .. +done -- cgit v1.2.3