X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=src%2Finitscripts%2Fsystem%2Funbound;h=fbb096e0d7bd0ad8c7318f76f1f499accda3dd6b;hp=e87f9e10dd6f9cbc86b678dd6574799972c501f0;hb=c25a386523c305615641a1810bcc3b009bc3cf07;hpb=64aed99df6ba3b057c35ebb6b9278a13ae5e575d diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index e87f9e10dd..fbb096e0d7 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -24,30 +24,6 @@ EDNS_DEFAULT_BUFFER_SIZE=4096 # Load optional configuration [ -e "/etc/sysconfig/unbound" ] && . /etc/sysconfig/unbound -function cidr() { - local cidr nbits IFS; - IFS=. read -r i1 i2 i3 i4 <<< ${1} - IFS=. read -r m1 m2 m3 m4 <<< ${2} - cidr=$(printf "%d.%d.%d.%d\n" "$((i1 & m1))" "$((i2 & m2))" "$((i3 & m3))" "$((i4 & m4))") - nbits=0 - IFS=. - for dec in $2 ; do - case $dec in - 255) let nbits+=8;; - 254) let nbits+=7;; - 252) let nbits+=6;; - 248) let nbits+=5;; - 240) let nbits+=4;; - 224) let nbits+=3;; - 192) let nbits+=2;; - 128) let nbits+=1;; - 0);; - *) echo "Error: $dec is not recognised"; exit 1 - esac - done - echo "${cidr}/${nbits}" -} - ip_address_revptr() { local addr=${1}